From 0574d5827f7269f86f835b7823db407616610d07 Mon Sep 17 00:00:00 2001 From: Richard Date: Tue, 18 Jun 2024 13:26:43 -0700 Subject: [PATCH] update time stamp --- .../Processes/DataImport/P700ProviderCertificateProvider.cs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/OFM.Infrastructure.WebAPI/Services/Processes/DataImport/P700ProviderCertificateProvider.cs b/OFM.Infrastructure.WebAPI/Services/Processes/DataImport/P700ProviderCertificateProvider.cs index f6c47b21..096edbd7 100644 --- a/OFM.Infrastructure.WebAPI/Services/Processes/DataImport/P700ProviderCertificateProvider.cs +++ b/OFM.Infrastructure.WebAPI/Services/Processes/DataImport/P700ProviderCertificateProvider.cs @@ -294,7 +294,7 @@ public async Task RunProcessAsync(ID365AppUserService appUserService } // Batch processing int batchSize = 1000; - for (int i = 0; i < differenceCsvRecords.Count; i += batchSize) + for(int i = 0; i < differenceCsvRecords.Count; i += batchSize) { var upsertECERequests = new List() { }; var batch = differenceCsvRecords.Skip(i).Take(batchSize).ToList(); @@ -323,6 +323,7 @@ public async Task RunProcessAsync(ID365AppUserService appUserService } Console.WriteLine("Upsert Batch process record index:", i.ToString()); } + if (string.IsNullOrEmpty(upsertMessages)) { upsertSucessfully = true; @@ -376,7 +377,7 @@ public async Task RunProcessAsync(ID365AppUserService appUserService var localtime = _timeProvider.GetLocalNow(); var endtime = _timeProvider.GetTimestamp(); var timediff = _timeProvider.GetElapsedTime(startTime, endtime).TotalSeconds; - dataImportMessages = localtime.ToString("yyyy-MM-dd HH:mm:ss") + " Total time:"+ timediff + " seconds.\r\n" + "Upsert " + differenceCsvRecords.Count + " record(s) sucessfully\r\n" + "Deactive " + missingInCsv.Count + " records not existing in csv file sucessfully\r\n"; + dataImportMessages = localtime.ToString("yyyy-MM-dd HH:mm:ss") + " Total time:"+ Math.Round(timediff,2) + " seconds.\r\n" + "Upsert " + differenceCsvRecords.Count + " record(s) sucessfully\r\n" + "Deactive " + missingInCsv.Count + " records not existing in csv file sucessfully\r\n"; var ECECertStatement = $"ofm_data_imports({_processParams.DataImportId})"; var payload = new JsonObject { { "ofm_message", dataImportMessages},