Skip to content

Commit

Permalink
update time stamp
Browse files Browse the repository at this point in the history
  • Loading branch information
RichardInCGI committed Jun 18, 2024
1 parent 84a7df8 commit 0574d58
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -294,7 +294,7 @@ public async Task<JsonObject> 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<HttpRequestMessage>() { };
var batch = differenceCsvRecords.Skip(i).Take(batchSize).ToList();
Expand Down Expand Up @@ -323,6 +323,7 @@ public async Task<JsonObject> RunProcessAsync(ID365AppUserService appUserService
}
Console.WriteLine("Upsert Batch process record index:", i.ToString());
}

if (string.IsNullOrEmpty(upsertMessages))
{
upsertSucessfully = true;
Expand Down Expand Up @@ -376,7 +377,7 @@ public async Task<JsonObject> 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},
Expand Down

0 comments on commit 0574d58

Please sign in to comment.