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