From 1a822aeb8e63dcea1b8b2dacce081a1ee7bb42f6 Mon Sep 17 00:00:00 2001 From: GZTime Date: Thu, 19 Dec 2024 21:25:25 +0800 Subject: [PATCH] chore(cronjob): increase watchdog interval --- src/GZCTF/Services/CronJobService.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/GZCTF/Services/CronJobService.cs b/src/GZCTF/Services/CronJobService.cs index 7262a0c6b..d8566d97e 100644 --- a/src/GZCTF/Services/CronJobService.cs +++ b/src/GZCTF/Services/CronJobService.cs @@ -118,7 +118,7 @@ async Task DropLock() void LaunchWatchDog() { - var delay = Random.Shared.Next(30, 60); + var delay = Random.Shared.Next(30, 120); _timer = new Timer(async void (_) => { @@ -139,7 +139,7 @@ void LaunchWatchDog() "WatchDog", e.Message], TaskStatus.Failed, LogLevel.Warning); } - }, null, TimeSpan.FromSeconds(delay), TimeSpan.FromMinutes(1)); + }, null, TimeSpan.FromSeconds(delay), TimeSpan.FromMinutes(5)); logger.SystemLog(Program.StaticLocalizer[nameof(Resources.Program.CronJob_LaunchedWatchDog)], TaskStatus.Pending, LogLevel.Debug);