Replace Thread.Sleep with Task.Delay (#6006)

This commit is contained in:
Justin Baur 2025-07-10 09:17:08 -04:00 committed by GitHub
parent f5be1ede2f
commit 3bfc24523e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -109,7 +109,7 @@ public abstract class BaseJobsHostedService : IHostedService, IDisposable
_logger.LogWarning($"Exception while trying to schedule job: {job.FullName}, {e}");
var random = new Random();
Thread.Sleep(random.Next(50, 250));
await Task.Delay(random.Next(50, 250));
}
}
}