Skip to content

Commit

Permalink
chore: calculate aggregates at UTC 0.
Browse files Browse the repository at this point in the history
  • Loading branch information
alsami committed Jan 9, 2021
1 parent 532f868 commit f1de210
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/Covid19Api.Worker/CountryStatisticsAggregateWorker.cs
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@ public CountryStatisticsAggregateWorker(ILogger<CountryStatisticsAggregateWorker

protected override async Task ExecuteAsync(CancellationToken stoppingToken)
{
// UTC 22 PM
var nextRun = DateTime.UtcNow.Date.AddDays(1).AddHours(-2);
// UTC day switch
var nextRun = DateTime.UtcNow.Date.AddDays(1);
this.logger.LogInformation("Next country-statistics aggregation at {at}", nextRun.ToString("dd.MM.yyyy HH:mm:ss"));
while (!stoppingToken.IsCancellationRequested)
{
Expand Down
4 changes: 2 additions & 2 deletions src/Covid19Api.Worker/GlobalStatisticsAggregationWorker.cs
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ public GlobalStatisticsAggregationWorker(ILogger<GlobalStatisticsAggregationWork

protected override async Task ExecuteAsync(CancellationToken stoppingToken)
{
// UTC 22 PM
var nextRun = DateTime.UtcNow.Date.AddDays(1).AddHours(-2);
// UTC day switch
var nextRun = DateTime.UtcNow.Date.AddDays(1);
this.logger.LogInformation("Next global-statistics aggregation at {at}", nextRun.ToString("dd.MM.yyyy HH:mm:ss"));
while (!stoppingToken.IsCancellationRequested)
{
Expand Down

0 comments on commit f1de210

Please sign in to comment.