코드들 내용 정리
This commit is contained in:
parent
4e940ba8ec
commit
f600bfe803
|
|
@ -73,10 +73,7 @@ namespace Server.Git
|
|||
process.WaitForExit();
|
||||
|
||||
// Git 명령 실행 결과 출력
|
||||
Console.WriteLine(process.StandardOutput.ReadToEnd());
|
||||
|
||||
// 오류 메시지 출력
|
||||
Console.WriteLine(process.StandardError.ReadToEnd());
|
||||
logger.Info(process.StandardOutput.ReadToEnd());
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -91,7 +88,7 @@ namespace Server.Git
|
|||
using (StreamWriter writer = new StreamWriter(repositoryPath + @"/excel.json"))
|
||||
{
|
||||
writer.Write(excel);
|
||||
Console.WriteLine($"save file : {repositoryPath + @"/excel.json"}");
|
||||
logger.Info($"save file : {repositoryPath + @"/excel.json"}");
|
||||
}
|
||||
//이곳에서 json변경후 저장
|
||||
//압축
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
using Microsoft.AspNetCore.Http;
|
||||
using NLog;
|
||||
using Npgsql;
|
||||
using Server.SQL;
|
||||
using Server.System;
|
||||
|
|
@ -8,6 +9,9 @@ namespace Server.Git
|
|||
{
|
||||
public class ExcelSQL
|
||||
{
|
||||
|
||||
private static readonly NLog.ILogger logger = LogManager.GetCurrentClassLogger();
|
||||
|
||||
List<sheet> sheets;
|
||||
|
||||
public ExcelSQL(List<sheet> sheets)
|
||||
|
|
@ -134,7 +138,7 @@ namespace Server.Git
|
|||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Console.WriteLine($"Error: {ex.Message}");
|
||||
logger.Error($"Error: {ex.Message}");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -142,7 +146,7 @@ namespace Server.Git
|
|||
{
|
||||
using (NpgsqlCommand command = new NpgsqlCommand(query, connection))
|
||||
{
|
||||
Console.WriteLine(query);
|
||||
logger.Info(query);
|
||||
command.ExecuteNonQuery();
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,6 +1,4 @@
|
|||
using Newtonsoft.Json;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
|
||||
namespace Server.Git
|
||||
{
|
||||
|
|
@ -29,7 +27,7 @@ namespace Server.Git
|
|||
}
|
||||
else
|
||||
{
|
||||
Console.WriteLine("-1 : NotUpdate");
|
||||
//Console.WriteLine("-1 : NotUpdate");
|
||||
return "";
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -3,8 +3,12 @@
|
|||
//0~100 테스트용 프로토콜
|
||||
Test = 0,
|
||||
AddUser = 1,
|
||||
//로그인,버전확인등등
|
||||
Downlode = 100,
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Downlode = 100,//기획 데이터 다운로드
|
||||
}
|
||||
|
||||
public enum Error
|
||||
|
|
|
|||
|
|
@ -30,11 +30,7 @@ namespace Server.System
|
|||
return Response;
|
||||
ProtocolProcessor.version = eaDelivery;
|
||||
|
||||
if (thread.ThreadState == ThreadState.Unstarted)
|
||||
{
|
||||
thread.Start();
|
||||
}
|
||||
else if (thread.ThreadState == ThreadState.Stopped)
|
||||
if (thread.ThreadState == ThreadState.Stopped)
|
||||
{
|
||||
thread = new Thread(git.Init);
|
||||
thread.Start();
|
||||
|
|
@ -66,6 +62,7 @@ namespace Server.System
|
|||
thread = new Thread(git.Init);
|
||||
successResp.status = 200;
|
||||
successResp.message = "Success";
|
||||
thread.Start();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue