parent
b4064c3bf9
commit
7b6567ea1c
|
|
@ -99,10 +99,10 @@ namespace Server.Git
|
||||||
//초기세팅일 경우 데이터를 받아오고 아닐경우 데이터를저장
|
//초기세팅일 경우 데이터를 받아오고 아닐경우 데이터를저장
|
||||||
if(ProtocolProcessor.version == "")
|
if(ProtocolProcessor.version == "")
|
||||||
{
|
{
|
||||||
string versionFilePath = Path.Combine(repositoryPath, @"/version.txt");
|
string versionFilePath = Path.Combine(repositoryPath + @"/version");
|
||||||
if (File.Exists(versionFilePath))
|
if (File.Exists(versionFilePath))
|
||||||
{
|
{
|
||||||
using (StreamReader reader = new StreamReader(repositoryPath + @"/version.txt"))
|
using (StreamReader reader = new StreamReader(repositoryPath + @"/version"))
|
||||||
{
|
{
|
||||||
ProtocolProcessor.version = reader.ReadToEnd();
|
ProtocolProcessor.version = reader.ReadToEnd();
|
||||||
}
|
}
|
||||||
|
|
@ -116,7 +116,7 @@ namespace Server.Git
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
using (StreamWriter writer = new StreamWriter(repositoryPath + @"/version.txt"))
|
using (StreamWriter writer = new StreamWriter(repositoryPath + @"/version"))
|
||||||
{
|
{
|
||||||
writer.Write(ProtocolProcessor.version);
|
writer.Write(ProtocolProcessor.version);
|
||||||
logger.Info("saveVersion");
|
logger.Info("saveVersion");
|
||||||
|
|
|
||||||
|
|
@ -70,6 +70,9 @@ namespace Server.Git
|
||||||
case "int":
|
case "int":
|
||||||
newTableQuery += $"{sheets[n].variable[m]} INT ";
|
newTableQuery += $"{sheets[n].variable[m]} INT ";
|
||||||
break;
|
break;
|
||||||
|
case "float":
|
||||||
|
newTableQuery += $"{sheets[n].variable[m]} FLOAT4 ";
|
||||||
|
break;
|
||||||
case "string":
|
case "string":
|
||||||
newTableQuery += $"{sheets[n].variable[m]} VARCHAR(255) ";
|
newTableQuery += $"{sheets[n].variable[m]} VARCHAR(255) ";
|
||||||
break;
|
break;
|
||||||
|
|
@ -77,6 +80,7 @@ namespace Server.Git
|
||||||
newTableQuery += $"{sheets[n].variable[m]} INT2 ";
|
newTableQuery += $"{sheets[n].variable[m]} INT2 ";
|
||||||
break;
|
break;
|
||||||
case "text":
|
case "text":
|
||||||
|
case "json":
|
||||||
newTableQuery += $"{sheets[n].variable[m]} TEXT ";
|
newTableQuery += $"{sheets[n].variable[m]} TEXT ";
|
||||||
break;
|
break;
|
||||||
case "time":
|
case "time":
|
||||||
|
|
@ -121,6 +125,7 @@ namespace Server.Git
|
||||||
break;
|
break;
|
||||||
case "string":
|
case "string":
|
||||||
case "text":
|
case "text":
|
||||||
|
case "json":
|
||||||
query += $"'{pair.Value[sheets[n].variable[m]]}'";
|
query += $"'{pair.Value[sheets[n].variable[m]]}'";
|
||||||
break;
|
break;
|
||||||
case "time":
|
case "time":
|
||||||
|
|
|
||||||
|
|
@ -7,6 +7,8 @@ namespace Server.System
|
||||||
{
|
{
|
||||||
private static readonly NLog.ILogger logger = LogManager.GetCurrentClassLogger();
|
private static readonly NLog.ILogger logger = LogManager.GetCurrentClassLogger();
|
||||||
|
|
||||||
|
public static bool isUpdate = false;
|
||||||
|
|
||||||
public static Thread thread;
|
public static Thread thread;
|
||||||
|
|
||||||
private static AbstractGit git;
|
private static AbstractGit git;
|
||||||
|
|
@ -14,7 +16,12 @@ namespace Server.System
|
||||||
|
|
||||||
public static string Process(HttpContext context)
|
public static string Process(HttpContext context)
|
||||||
{
|
{
|
||||||
//TODO 아무때나 호출되지 않게 만들기
|
isUpdate = !isUpdate;
|
||||||
|
if (isUpdate)
|
||||||
|
{
|
||||||
|
return successResp.ToJson();
|
||||||
|
}
|
||||||
|
|
||||||
string Response;
|
string Response;
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
|
|
|
||||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
|
@ -139,3 +139,6 @@
|
||||||
2.0
|
2.0
|
||||||
2.0
|
2.0
|
||||||
2.0
|
2.0
|
||||||
|
2.0
|
||||||
|
2.0
|
||||||
|
2.0
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue