1
0
Fork 0
mirror of https://github.com/Jackett/Jackett synced 2025-02-24 15:21:06 +00:00

UpdateService: first update check after 1 hour

This commit is contained in:
kaso17 2018-04-17 11:35:34 +02:00
parent 427428d09b
commit 457449866e

View file

@ -57,11 +57,13 @@ namespace Jackett.Common.Services
private async void UpdateWorkerThread()
{
var delayHours = 1; // first check after 1 hour (for users not running jackett 24/7)
while (true)
{
locker.WaitOne((int)new TimeSpan(24, 0, 0).TotalMilliseconds);
locker.WaitOne((int)new TimeSpan(delayHours, 0, 0).TotalMilliseconds);
locker.Reset();
await CheckForUpdates();
delayHours = 24; // following checks only once/24 hours
}
}