Skip to content

Commit

Permalink
Fix TryRunJob
Browse files Browse the repository at this point in the history
  • Loading branch information
Sebakov Dmitriy Sergeevich committed Nov 29, 2021
1 parent 1e596a0 commit 0d8d8a9
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/Horarium/Handlers/RunnerJobs.cs
Original file line number Diff line number Diff line change
Expand Up @@ -137,15 +137,15 @@ private async Task<bool> TryRunJob(CancellationToken cancellationToken, TimeSpan
throw new TaskCanceledException();
}

if (isJobReady)
{
return true;
}

if (!waitTime.Equals(TimeSpan.Zero))
{
await Task.Delay(waitTime, cancellationToken);
}

if (isJobReady)
{
return true;
}
}

return false;
Expand Down

0 comments on commit 0d8d8a9

Please sign in to comment.