This commit is contained in:
2020-05-25 22:41:05 +00:00
parent 41514ea408
commit 77f1962b18
2 changed files with 13 additions and 24 deletions

View File

@@ -20,8 +20,8 @@ namespace AyaNova.Generator
public class GeneratorService : BackgroundService
{
private readonly ILogger<GeneratorService> log;
// private const int MAXIMUM_MS_ALLOWED_FOR_PROCESSING_ALL_JOBS = 1 * 60 * 1000;//1 minutes TEST TEST TEST #####
#if(DEBUG)
// private const int MAXIMUM_MS_ALLOWED_FOR_PROCESSING_ALL_JOBS = 1 * 60 * 1000;//1 minutes TEST TEST TEST #####
#if (DEBUG)
private const int GENERATE_SECONDS = 5;
#else
private const int GENERATE_SECONDS = 20;
@@ -64,8 +64,9 @@ namespace AyaNova.Generator
System.Diagnostics.Debug.WriteLine($"### GENERATE calling JobsBiz.ProcessJobs");
//Capture metrics
CoreJobMetricsSnapshot.DoJob();
//TODO: this should be big timeout and then inside the process jobs each job has it's own timeout
await JobsBiz.ProcessJobsAsync();
await JobsBiz.ProcessJobsAsync();
//Capture metrics again, (calling repeatedly won't increase metrics but will ensure it doesn't miss frequency of capturing)
CoreJobMetricsSnapshot.DoJob();
System.Diagnostics.Debug.WriteLine($"### GENERATE BACK FROM calling JobsBiz.ProcessJobs");
}
}