Skip to content

Commit

Permalink
chore(cronjob): increase watchdog interval
Browse files Browse the repository at this point in the history
  • Loading branch information
GZTimeWalker committed Dec 19, 2024
1 parent 29f4f42 commit 1a822ae
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/GZCTF/Services/CronJobService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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 (_) =>
{
Expand All @@ -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);
Expand Down

0 comments on commit 1a822ae

Please sign in to comment.