버그 확인용 검사 코드 추가
This commit is contained in:
parent
c5a72a00fb
commit
2b258dfe73
|
|
@ -22,15 +22,19 @@ namespace Server.Git
|
|||
{
|
||||
restart:
|
||||
isRestart = false;
|
||||
logger.Info("Pull");
|
||||
Pull();
|
||||
if (isRestart)
|
||||
goto restart;
|
||||
logger.Info("ChangeScript");
|
||||
string excel = ChangeScript();
|
||||
if (isRestart)
|
||||
goto restart;
|
||||
logger.Info("Push");
|
||||
Push(excel);
|
||||
if (isRestart)
|
||||
goto restart;
|
||||
logger.Info("DataSet");
|
||||
DataSet();
|
||||
}
|
||||
|
||||
|
|
@ -95,7 +99,9 @@ namespace Server.Git
|
|||
//압축
|
||||
//string EncryptoExcel = crypto.Compress(excel);
|
||||
//암호화
|
||||
logger.Info("old data : \n" + ProtocolProcessor.cryptoData);
|
||||
ProtocolProcessor.cryptoData = crypto.Compress(excel);
|
||||
logger.Info("new data : \n" + ProtocolProcessor.cryptoData);
|
||||
|
||||
// 스테이징
|
||||
RepositorySet("add .", repositoryPath);
|
||||
|
|
@ -167,7 +173,7 @@ namespace Server.Git
|
|||
/// </summary>
|
||||
public void DataSet()
|
||||
{
|
||||
int index = -1;
|
||||
int index;
|
||||
|
||||
index = sheets.FindIndex(n => n.name == Statics.equipmentExcel.sheetName);
|
||||
if(index != -1)
|
||||
|
|
|
|||
|
|
@ -4,15 +4,15 @@ var builder = WebApplication.CreateBuilder(args);
|
|||
var app = builder.Build();
|
||||
|
||||
//웹서버 초기화
|
||||
ProtocolProcessor.Init();
|
||||
//ProtocolProcessor.Init();
|
||||
//깃 웹훅 초기화
|
||||
GItWebhook.Init();
|
||||
//GItWebhook.Init();
|
||||
|
||||
//http용 데이터
|
||||
app.MapPost("/", ProtocolProcessor.Process);
|
||||
//app.MapPost("/", ProtocolProcessor.Process);
|
||||
|
||||
//git 접근용 웹훅
|
||||
app.MapPost("/git", GItWebhook.Process);
|
||||
//app.MapPost("/git", GItWebhook.Process);
|
||||
|
||||
//app.MapPost("/update", GItWebhook.Process);
|
||||
|
||||
|
|
@ -22,4 +22,10 @@ app.MapPost("/git", GItWebhook.Process);
|
|||
//app.MapPost("/spin/random", Spin.Random);
|
||||
//#endif
|
||||
|
||||
|
||||
app.MapGet("/update", (HttpContext context) => {
|
||||
ProtocolProcessor.cryptoData = (new Random()).Next().ToString();
|
||||
return ProtocolProcessor.cryptoData;
|
||||
});
|
||||
|
||||
app.Run(Statics.URL);
|
||||
|
|
|
|||
|
|
@ -113,11 +113,13 @@ namespace Server.System {
|
|||
|
||||
if (thread.ThreadState == ThreadState.Stopped)
|
||||
{
|
||||
logger.Info("new excel update");
|
||||
thread = new Thread(git.Init);
|
||||
thread.Start();
|
||||
}
|
||||
else if (thread.ThreadState == ThreadState.WaitSleepJoin || thread.ThreadState == ThreadState.Running)
|
||||
{
|
||||
logger.Info("new excel restart");
|
||||
git.isRestart = true;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue