Skip to content

Commit

Permalink
Merge pull request #605 from bcgov/yj
Browse files Browse the repository at this point in the history
Yj
  • Loading branch information
ychung-mot committed Sep 6, 2024
2 parents 6eacb43 + 8b43b89 commit f4d9846
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
2 changes: 1 addition & 1 deletion server/StrDss.Hangfire/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
var dbPass = builder.Configuration.GetValue<string>("DB_PASS");
var dbPort = builder.Configuration.GetValue<string>("DB_PORT");

var connString = $"Host={dbHost};Username={dbUser};Password={dbPass};Database={dbName};Port={dbPort};";
var connString = $"Host={dbHost};Username={dbUser};Password={dbPass};Database={dbName};Port={dbPort};CommandTimeout=300";

builder.Services.AddHttpContextAccessor();

Expand Down
7 changes: 6 additions & 1 deletion server/StrDss.Service/BizLicenceService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,6 @@ public async Task ProcessBizLicenceUploadAsync()
return;
}


if (!_validator.CommonCodes.Any())
{
_validator.CommonCodes = await _codeSetRepo.LoadCodeSetAsync();
Expand All @@ -79,6 +78,12 @@ public async Task ProcessBizLicenceUploadAsync()

_unitOfWork.Commit();

processStopwatch.Stop();

_logger.LogInformation($"Processed business licences and saved to a temporary table: {processStopwatch.Elapsed.TotalSeconds} seconds");

processStopwatch.Restart();

var errorCount = upload.DssUploadLines.Count(x => x.IsValidationFailure);

if (errorCount == 0) await _bizLicenceRepo.ProcessBizLicTempTable(upload.ProvidingOrganizationId);
Expand Down

0 comments on commit f4d9846

Please sign in to comment.