mirror of
https://github.com/Jackett/Jackett.git
synced 2025-09-17 17:34:09 +02:00
UpdateService: first update check after 1 hour
This commit is contained in:
@@ -57,11 +57,13 @@ namespace Jackett.Common.Services
|
|||||||
|
|
||||||
private async void UpdateWorkerThread()
|
private async void UpdateWorkerThread()
|
||||||
{
|
{
|
||||||
|
var delayHours = 1; // first check after 1 hour (for users not running jackett 24/7)
|
||||||
while (true)
|
while (true)
|
||||||
{
|
{
|
||||||
locker.WaitOne((int)new TimeSpan(24, 0, 0).TotalMilliseconds);
|
locker.WaitOne((int)new TimeSpan(delayHours, 0, 0).TotalMilliseconds);
|
||||||
locker.Reset();
|
locker.Reset();
|
||||||
await CheckForUpdates();
|
await CheckForUpdates();
|
||||||
|
delayHours = 24; // following checks only once/24 hours
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user