Fixing report timeout error message problem recently introduced when changed timeout process
This commit is contained in:
@@ -846,6 +846,7 @@ namespace AyaNova.Biz
|
||||
{
|
||||
log.LogDebug($"Report render cancelled by user OR exceeded timeout setting of {ServerBootConfig.AYANOVA_REPORT_RENDERING_TIMEOUT} minutes, report id: {reportRequest.ReportId}, record count:{reportRequest.SelectedRowIds.LongLength}, user:{userName}");
|
||||
var json = Newtonsoft.Json.JsonConvert.SerializeObject(new { rendererror = new { timeout = true, timeoutsetting = ServerBootConfig.AYANOVA_REPORT_RENDERING_TIMEOUT } }, Newtonsoft.Json.Formatting.None);
|
||||
//"{\"rendererror\":{\"timeout\":1}}"
|
||||
await JobsBiz.LogJobAsync(job.GId, json);
|
||||
|
||||
await JobsBiz.UpdateJobStatusAsync(job.GId, JobStatus.Failed);
|
||||
|
||||
@@ -64,12 +64,14 @@ namespace AyaNova.Util
|
||||
{
|
||||
if (instance.Expires < DateTime.UtcNow)
|
||||
{
|
||||
await JobsBiz.LogJobAsync(instance.JobId, $"rendererror:timeout,{ServerBootConfig.AYANOVA_REPORT_RENDERING_TIMEOUT}");//parseable for print client
|
||||
var json = Newtonsoft.Json.JsonConvert.SerializeObject(new { rendererror = new { timeout = true, timeoutsetting = ServerBootConfig.AYANOVA_REPORT_RENDERING_TIMEOUT } }, Newtonsoft.Json.Formatting.None);
|
||||
await JobsBiz.LogJobAsync(instance.JobId, json);
|
||||
await JobsBiz.UpdateJobStatusAsync(instance.JobId, JobStatus.Failed);
|
||||
}
|
||||
else
|
||||
{
|
||||
await JobsBiz.LogJobAsync(instance.JobId, $"rendererror:cancelled");
|
||||
var json = Newtonsoft.Json.JsonConvert.SerializeObject(new { rendererror = new { cancelled = true} }, Newtonsoft.Json.Formatting.None);
|
||||
await JobsBiz.LogJobAsync(instance.JobId, json);
|
||||
await JobsBiz.UpdateJobStatusAsync(instance.JobId, JobStatus.Completed);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user