diff --git a/.vs/ASCKU Projects/v16/.suo b/.vs/ASCKU Projects/v16/.suo index 97d7067..b447214 100644 Binary files a/.vs/ASCKU Projects/v16/.suo and b/.vs/ASCKU Projects/v16/.suo differ diff --git a/ApiServer/obj/Debug/net5.0/ApiServer.csproj.AssemblyReference.cache b/ApiServer/obj/Debug/net5.0/ApiServer.csproj.AssemblyReference.cache index bd3102d..39bf831 100644 Binary files a/ApiServer/obj/Debug/net5.0/ApiServer.csproj.AssemblyReference.cache and b/ApiServer/obj/Debug/net5.0/ApiServer.csproj.AssemblyReference.cache differ diff --git a/ClientCollector/Program.cs b/ClientCollector/Program.cs index 26e894d..4f9abaa 100644 --- a/ClientCollector/Program.cs +++ b/ClientCollector/Program.cs @@ -162,41 +162,50 @@ namespace ClientCollector if (!currDate.HasValue) currDate = new DateTime(2001, 02, 01); var flagcycle = false; + { + log.Info("Connect to archive."); + await CreateConnectionNFS(mainDir); + } while (currDate.Value < DateTime.Now.AddDays(-1)) { try { - while(DateTime.Now.Hour < 12) + /*while(DateTime.Now.Hour < 12) { log.Info("Await 12:00."); await Task.Delay(15000 * 60); - } - log.Info("Connect to archive."); - await CreateConnectionNFS(mainDir); + }*/ var subDir = Path.Combine(mainDir, "data", currDate.Value.Year.ToString("D4"), currDate.Value.Month.ToString("D2"), currDate.Value.Day.ToString("D2")); log.Info("Check dir: " + subDir); - if (Directory.Exists(subDir)) - { - var listFiles = Directory.GetFiles(subDir); - foreach(var fileDir in listFiles) - { - log.Info("Get file: " + fileDir); - var fileStruct = File.ReadAllBytes(fileDir); - log.Info("Send file to API: " + fileDir); - while (!SendData(currDate.Value, Path.GetFileName(fileDir), fileStruct)) + if (Directory.Exists(Path.Combine(mainDir, "data"))) { + if (Directory.Exists(subDir)) + { + var listFiles = Directory.GetFiles(subDir); + foreach (var fileDir in listFiles) { - log.Warn("Can't send data to API."); - await Task.Delay(10000); + log.Info("Get file: " + fileDir); + var fileStruct = File.ReadAllBytes(fileDir); + log.Info("Send file to API: " + fileDir); + while (!SendData(currDate.Value, Path.GetFileName(fileDir), fileStruct)) + { + log.Warn("Can't send data to API."); + await Task.Delay(10000); + } } - } + } + log.Info("End day: " + subDir); + SaveCurrData(nameCurrDate, currDate.Value); + currDate = currDate.Value.AddDays(1); + await Task.Delay(1000); + } + else + { + log.Warn("Archive not exist."); + } - log.Info("End day: " + subDir); - SaveCurrData(nameCurrDate, currDate.Value); - currDate = currDate.Value.AddDays(1); - await Task.Delay(5000); } catch (Exception e) { @@ -212,7 +221,7 @@ namespace ClientCollector SaveCurrData(nameCurrDate, currDate.Value); } - static async Task CreateConnectionNFS(string dir) + static async Task ConnectNFS(string dir) { var dirCreated = false; while (!dirCreated) diff --git a/ClientCollector/Properties/PublishProfiles/FolderProfile.pubxml.user b/ClientCollector/Properties/PublishProfiles/FolderProfile.pubxml.user index ddd9907..ec02150 100644 --- a/ClientCollector/Properties/PublishProfiles/FolderProfile.pubxml.user +++ b/ClientCollector/Properties/PublishProfiles/FolderProfile.pubxml.user @@ -4,6 +4,6 @@ https://go.microsoft.com/fwlink/?LinkID=208121. --> - True|2021-08-02T17:58:49.1867297Z;True|2021-08-02T22:56:02.6749724+05:00;True|2021-08-02T22:50:24.0842490+05:00;True|2021-08-02T22:46:50.7307549+05:00;True|2021-08-02T22:46:32.2783734+05:00;True|2021-08-02T22:37:45.7957317+05:00;True|2021-08-02T22:34:37.2905589+05:00;True|2021-08-02T22:31:30.3451541+05:00;True|2021-08-02T12:26:02.5496847+05:00;True|2021-08-01T23:12:48.3492831+05:00;True|2021-08-01T22:53:02.2382201+05:00;True|2021-08-01T22:48:16.9658882+05:00;True|2021-08-01T22:40:58.1479436+05:00;True|2021-08-01T22:28:58.9840017+05:00;True|2021-08-01T20:16:20.5210616+05:00;True|2021-08-01T19:27:43.9900600+05:00;True|2021-08-01T19:18:48.8000969+05:00;True|2021-08-01T19:15:19.9257002+05:00;True|2021-08-01T19:08:17.1315589+05:00;True|2021-07-31T20:35:08.9408458+05:00;True|2021-07-31T20:20:29.0886405+05:00; + True|2021-08-03T01:22:57.0758714Z;True|2021-08-03T06:18:08.6594656+05:00;True|2021-08-02T22:58:49.1867297+05:00;True|2021-08-02T22:56:02.6749724+05:00;True|2021-08-02T22:50:24.0842490+05:00;True|2021-08-02T22:46:50.7307549+05:00;True|2021-08-02T22:46:32.2783734+05:00;True|2021-08-02T22:37:45.7957317+05:00;True|2021-08-02T22:34:37.2905589+05:00;True|2021-08-02T22:31:30.3451541+05:00;True|2021-08-02T12:26:02.5496847+05:00;True|2021-08-01T23:12:48.3492831+05:00;True|2021-08-01T22:53:02.2382201+05:00;True|2021-08-01T22:48:16.9658882+05:00;True|2021-08-01T22:40:58.1479436+05:00;True|2021-08-01T22:28:58.9840017+05:00;True|2021-08-01T20:16:20.5210616+05:00;True|2021-08-01T19:27:43.9900600+05:00;True|2021-08-01T19:18:48.8000969+05:00;True|2021-08-01T19:15:19.9257002+05:00;True|2021-08-01T19:08:17.1315589+05:00;True|2021-07-31T20:35:08.9408458+05:00;True|2021-07-31T20:20:29.0886405+05:00; \ No newline at end of file diff --git a/ClientCollector/bin/Release/ClientCollector.dll b/ClientCollector/bin/Release/ClientCollector.dll index aec176f..02871a7 100644 Binary files a/ClientCollector/bin/Release/ClientCollector.dll and b/ClientCollector/bin/Release/ClientCollector.dll differ diff --git a/ClientCollector/bin/Release/ClientCollector.pdb b/ClientCollector/bin/Release/ClientCollector.pdb index 371317e..594923f 100644 Binary files a/ClientCollector/bin/Release/ClientCollector.pdb and b/ClientCollector/bin/Release/ClientCollector.pdb differ diff --git a/ClientCollector/bin/Release/net5.0/ClientCollector.dll b/ClientCollector/bin/Release/net5.0/ClientCollector.dll index aec176f..02871a7 100644 Binary files a/ClientCollector/bin/Release/net5.0/ClientCollector.dll and b/ClientCollector/bin/Release/net5.0/ClientCollector.dll differ diff --git a/ClientCollector/bin/Release/net5.0/ClientCollector.pdb b/ClientCollector/bin/Release/net5.0/ClientCollector.pdb index 371317e..594923f 100644 Binary files a/ClientCollector/bin/Release/net5.0/ClientCollector.pdb and b/ClientCollector/bin/Release/net5.0/ClientCollector.pdb differ diff --git a/ClientCollector/obj/Debug/net5.0/ClientCollector.csproj.AssemblyReference.cache b/ClientCollector/obj/Debug/net5.0/ClientCollector.csproj.AssemblyReference.cache index 093d8f9..efa2e79 100644 Binary files a/ClientCollector/obj/Debug/net5.0/ClientCollector.csproj.AssemblyReference.cache and b/ClientCollector/obj/Debug/net5.0/ClientCollector.csproj.AssemblyReference.cache differ diff --git a/ClientCollector/obj/Release/net5.0/ClientCollector.dll b/ClientCollector/obj/Release/net5.0/ClientCollector.dll index aec176f..02871a7 100644 Binary files a/ClientCollector/obj/Release/net5.0/ClientCollector.dll and b/ClientCollector/obj/Release/net5.0/ClientCollector.dll differ diff --git a/ClientCollector/obj/Release/net5.0/ClientCollector.pdb b/ClientCollector/obj/Release/net5.0/ClientCollector.pdb index 371317e..594923f 100644 Binary files a/ClientCollector/obj/Release/net5.0/ClientCollector.pdb and b/ClientCollector/obj/Release/net5.0/ClientCollector.pdb differ diff --git a/DataClient/obj/Debug/net5.0/DataClient.csproj.AssemblyReference.cache b/DataClient/obj/Debug/net5.0/DataClient.csproj.AssemblyReference.cache index fcb89c0..9a8b63a 100644 Binary files a/DataClient/obj/Debug/net5.0/DataClient.csproj.AssemblyReference.cache and b/DataClient/obj/Debug/net5.0/DataClient.csproj.AssemblyReference.cache differ diff --git a/Korp90TimePasport/obj/Debug/netcoreapp3.1/Korp90TimePasport.csproj.AssemblyReference.cache b/Korp90TimePasport/obj/Debug/netcoreapp3.1/Korp90TimePasport.csproj.AssemblyReference.cache index fa6c25a..f2ba4a9 100644 Binary files a/Korp90TimePasport/obj/Debug/netcoreapp3.1/Korp90TimePasport.csproj.AssemblyReference.cache and b/Korp90TimePasport/obj/Debug/netcoreapp3.1/Korp90TimePasport.csproj.AssemblyReference.cache differ diff --git a/Korp90TimePasport/obj/Release/netcoreapp3.1/Korp90TimePasport.csproj.AssemblyReference.cache b/Korp90TimePasport/obj/Release/netcoreapp3.1/Korp90TimePasport.csproj.AssemblyReference.cache index cf83b4c..bd6b570 100644 Binary files a/Korp90TimePasport/obj/Release/netcoreapp3.1/Korp90TimePasport.csproj.AssemblyReference.cache and b/Korp90TimePasport/obj/Release/netcoreapp3.1/Korp90TimePasport.csproj.AssemblyReference.cache differ diff --git a/Mailing/obj/Debug/netcoreapp3.1/Mailing.csproj.AssemblyReference.cache b/Mailing/obj/Debug/netcoreapp3.1/Mailing.csproj.AssemblyReference.cache index f5e894a..e8c9495 100644 Binary files a/Mailing/obj/Debug/netcoreapp3.1/Mailing.csproj.AssemblyReference.cache and b/Mailing/obj/Debug/netcoreapp3.1/Mailing.csproj.AssemblyReference.cache differ diff --git a/Mailing/obj/Release/netcoreapp3.1/Mailing.csproj.AssemblyReference.cache b/Mailing/obj/Release/netcoreapp3.1/Mailing.csproj.AssemblyReference.cache index 8b013be..7959fb9 100644 Binary files a/Mailing/obj/Release/netcoreapp3.1/Mailing.csproj.AssemblyReference.cache and b/Mailing/obj/Release/netcoreapp3.1/Mailing.csproj.AssemblyReference.cache differ diff --git a/PrintPDF/MigraDoc.Rendering/obj/Debug/netstandard2.0/MigraDoc.Rendering.csproj.AssemblyReference.cache b/PrintPDF/MigraDoc.Rendering/obj/Debug/netstandard2.0/MigraDoc.Rendering.csproj.AssemblyReference.cache index 7b3034d..f5e894a 100644 Binary files a/PrintPDF/MigraDoc.Rendering/obj/Debug/netstandard2.0/MigraDoc.Rendering.csproj.AssemblyReference.cache and b/PrintPDF/MigraDoc.Rendering/obj/Debug/netstandard2.0/MigraDoc.Rendering.csproj.AssemblyReference.cache differ diff --git a/Test2/obj/Debug/net5.0/Test2.csproj.AssemblyReference.cache b/Test2/obj/Debug/net5.0/Test2.csproj.AssemblyReference.cache index ce25299..b58ce0d 100644 Binary files a/Test2/obj/Debug/net5.0/Test2.csproj.AssemblyReference.cache and b/Test2/obj/Debug/net5.0/Test2.csproj.AssemblyReference.cache differ diff --git a/Test2/obj/Release/net5.0/Test2.csproj.AssemblyReference.cache b/Test2/obj/Release/net5.0/Test2.csproj.AssemblyReference.cache index d77fb70..6d15dd7 100644 Binary files a/Test2/obj/Release/net5.0/Test2.csproj.AssemblyReference.cache and b/Test2/obj/Release/net5.0/Test2.csproj.AssemblyReference.cache differ diff --git a/Tests/obj/Debug/netcoreapp3.1/Tests.csproj.AssemblyReference.cache b/Tests/obj/Debug/netcoreapp3.1/Tests.csproj.AssemblyReference.cache index 8b013be..9357e62 100644 Binary files a/Tests/obj/Debug/netcoreapp3.1/Tests.csproj.AssemblyReference.cache and b/Tests/obj/Debug/netcoreapp3.1/Tests.csproj.AssemblyReference.cache differ diff --git a/Tests/obj/Release/netcoreapp3.1/Tests.csproj.AssemblyReference.cache b/Tests/obj/Release/netcoreapp3.1/Tests.csproj.AssemblyReference.cache index 86ebe25..f5e894a 100644 Binary files a/Tests/obj/Release/netcoreapp3.1/Tests.csproj.AssemblyReference.cache and b/Tests/obj/Release/netcoreapp3.1/Tests.csproj.AssemblyReference.cache differ diff --git a/WebApplication1/obj/Release/net5.0/WebApplication1.csproj.AssemblyReference.cache b/WebApplication1/obj/Release/net5.0/WebApplication1.csproj.AssemblyReference.cache index f5e894a..5966ae5 100644 Binary files a/WebApplication1/obj/Release/net5.0/WebApplication1.csproj.AssemblyReference.cache and b/WebApplication1/obj/Release/net5.0/WebApplication1.csproj.AssemblyReference.cache differ diff --git a/test3/obj/Release/net5.0/test3.csproj.AssemblyReference.cache b/test3/obj/Release/net5.0/test3.csproj.AssemblyReference.cache index 54dc9a1..3055dbd 100644 Binary files a/test3/obj/Release/net5.0/test3.csproj.AssemblyReference.cache and b/test3/obj/Release/net5.0/test3.csproj.AssemblyReference.cache differ