Skip to content

Commit

Permalink
random number in seconds not milliseconds
Browse files Browse the repository at this point in the history
  • Loading branch information
paullocknimble committed Nov 6, 2024
1 parent 6b06d26 commit 239db55
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@ public CreateCompleteProjectsService(ILogger<CreateCompleteProjectsService> logg
protected override async Task ExecuteAsync(CancellationToken stoppingToken)
{
// delay start to prevent runtime colisions
var startDelayInMilliseconds = GetSecureRandomDelay(1000, 60000);
var startDelayInSeconds = GetSecureRandomDelay(1, 60);

await Task.Delay(startDelayInMilliseconds, stoppingToken);
await Task.Delay(startDelayInSeconds * 1000, stoppingToken);

while (!stoppingToken.IsCancellationRequested)
{
Expand Down

0 comments on commit 239db55

Please sign in to comment.