diff --git a/.vs/ASCKU Projects/v16/.suo b/.vs/ASCKU Projects/v16/.suo index 038e525..937caae 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 50037aa..15b2844 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/ApiServer/obj/Release/net5.0/ApiServer.csproj.AssemblyReference.cache b/ApiServer/obj/Release/net5.0/ApiServer.csproj.AssemblyReference.cache index 46cf44d..becad07 100644 Binary files a/ApiServer/obj/Release/net5.0/ApiServer.csproj.AssemblyReference.cache and b/ApiServer/obj/Release/net5.0/ApiServer.csproj.AssemblyReference.cache differ diff --git a/ClientCollector/Program.cs b/ClientCollector/Program.cs index 694b521..a28ed25 100644 --- a/ClientCollector/Program.cs +++ b/ClientCollector/Program.cs @@ -40,11 +40,13 @@ namespace ClientCollector static async void WorkPasport() { + var IpSTP = "10.10.45.152"; + var PortSTP = 1070; var nameCurrDate = "pasport"; var currDate = GetCurrData(nameCurrDate); if (!currDate.HasValue) currDate = new DateTime(2001, 01, 01); - NETClient netClient = new NETClient("10.10.45.152", 1070); + NETClient netClient = new NETClient(IpSTP, PortSTP); while (currDate.Value < DateTime.Now.AddDays(-1)) { try @@ -58,6 +60,7 @@ namespace ClientCollector if (!netClient.Connect()) { netClient.Close(); + netClient = new NETClient(IpSTP, PortSTP); log.Warn("Can't connect to STP."); await Task.Delay(10000); } @@ -67,17 +70,17 @@ namespace ClientCollector currPasports = Array.Empty(); foreach (var paspDir in currPasports) { - var count = 0; do { try { - log.Info("Get pasport: " + paspDir + " try " + (count + 1)); + log.Info("Get pasport: " + paspDir); while (!netClient.Connected()) if (!netClient.Connect()) { log.Warn("Can't connect to STP."); netClient.Close(); + netClient = new NETClient(IpSTP, PortSTP); await Task.Delay(10000); } var pasp = netClient.Full_Pasp_Download(paspDir); @@ -85,13 +88,11 @@ namespace ClientCollector if (pasp == null || !pasp.HasData) { log.Warn("Can't get pasport."); - if (netClient.Connect()) - count++; - netClient.Close(); + netClient = new NETClient(IpSTP, PortSTP); await Task.Delay(10000); continue; } - while (SendPasport(pasp)) + while (!SendPasport(pasp)) { log.Warn("Can't send pasp to API."); await Task.Delay(10000); @@ -100,18 +101,20 @@ namespace ClientCollector } catch (Exception e) { - log.Warn(e); + log.Warn(e.Message); await Task.Delay(5000); } } - while (count < 5); + while (true); } + log.Info("End day: " + currDir); SaveCurrData(nameCurrDate, currDate.Value); currDate = currDate.Value.AddDays(1); + await Task.Delay(60000); } catch (Exception e) { - log.Warn(e); + log.Warn(e.Message); await Task.Delay(1000 * 60 * 5); } } @@ -264,7 +267,7 @@ namespace ClientCollector } catch (Exception e) { - log.Warn(e); + log.Warn(e.Message); return false; } } @@ -299,7 +302,7 @@ namespace ClientCollector } catch (Exception e) { - log.Warn(e); + log.Warn(e.Message); return null; } } diff --git a/ClientCollector/Properties/PublishProfiles/FolderProfile.pubxml.user b/ClientCollector/Properties/PublishProfiles/FolderProfile.pubxml.user index 632909f..d22c5fa 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-01T14:27:43.9900600Z;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-01T17:53:02.2382201Z;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 50ad41c..0d45dd8 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 fdb8019..2f073ec 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 50ad41c..0d45dd8 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 fdb8019..2f073ec 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/bin/Release/net5.0/ref/ClientCollector.dll b/ClientCollector/bin/Release/net5.0/ref/ClientCollector.dll index 954da53..b53fbcf 100644 Binary files a/ClientCollector/bin/Release/net5.0/ref/ClientCollector.dll and b/ClientCollector/bin/Release/net5.0/ref/ClientCollector.dll differ diff --git a/ClientCollector/obj/Debug/net5.0/ClientCollector.csproj.AssemblyReference.cache b/ClientCollector/obj/Debug/net5.0/ClientCollector.csproj.AssemblyReference.cache index 2aaaa32..3698696 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 50ad41c..0d45dd8 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 fdb8019..2f073ec 100644 Binary files a/ClientCollector/obj/Release/net5.0/ClientCollector.pdb and b/ClientCollector/obj/Release/net5.0/ClientCollector.pdb differ diff --git a/ClientCollector/obj/Release/net5.0/ref/ClientCollector.dll b/ClientCollector/obj/Release/net5.0/ref/ClientCollector.dll index 954da53..b53fbcf 100644 Binary files a/ClientCollector/obj/Release/net5.0/ref/ClientCollector.dll and b/ClientCollector/obj/Release/net5.0/ref/ClientCollector.dll differ diff --git a/DataClient/obj/Release/net5.0/DataClient.csproj.AssemblyReference.cache b/DataClient/obj/Release/net5.0/DataClient.csproj.AssemblyReference.cache index fcb89c0..9a8b63a 100644 Binary files a/DataClient/obj/Release/net5.0/DataClient.csproj.AssemblyReference.cache and b/DataClient/obj/Release/net5.0/DataClient.csproj.AssemblyReference.cache differ diff --git a/DataClients/obj/Release/netstandard2.0/DataClients.csproj.AssemblyReference.cache b/DataClients/obj/Release/netstandard2.0/DataClients.csproj.AssemblyReference.cache index 1cc11da..75d709b 100644 Binary files a/DataClients/obj/Release/netstandard2.0/DataClients.csproj.AssemblyReference.cache and b/DataClients/obj/Release/netstandard2.0/DataClients.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..55f42fd 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 9b473e1..2ce2219 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/PdfSharp.Charting/obj/Debug/netstandard2.0/PdfSharp.Charting.csproj.AssemblyReference.cache b/PrintPDF/PdfSharp.Charting/obj/Debug/netstandard2.0/PdfSharp.Charting.csproj.AssemblyReference.cache index 34f4a98..9846b9c 100644 Binary files a/PrintPDF/PdfSharp.Charting/obj/Debug/netstandard2.0/PdfSharp.Charting.csproj.AssemblyReference.cache and b/PrintPDF/PdfSharp.Charting/obj/Debug/netstandard2.0/PdfSharp.Charting.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 b58ce0d..ce25299 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 787c773..9a8b63a 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/test3/obj/Debug/net5.0/test3.csproj.AssemblyReference.cache b/test3/obj/Debug/net5.0/test3.csproj.AssemblyReference.cache index 57849e8..630aa64 100644 Binary files a/test3/obj/Debug/net5.0/test3.csproj.AssemblyReference.cache and b/test3/obj/Debug/net5.0/test3.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 04ca5a5..04bed6a 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