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:
parent
427428d09b
commit
457449866e
1 changed files with 3 additions and 1 deletions
|
@ -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
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue