fix: reduce idle runner polling by default

Raise the default idle fetch backoff ceiling to reduce steady-state FetchTask traffic from idle runner fleets while keeping the value configurable for installations that need faster idle polling.

Fixes: https://gitea.com/gitea/runner/issues/762

Co-Authored-By: GPT-5 Codex <codex@openai.com>
This commit is contained in:
bircni
2026-07-03 21:56:15 +02:00
parent 0ee4643d4a
commit 3879f14d89
3 changed files with 8 additions and 2 deletions

View File

@@ -183,7 +183,7 @@ func LoadDefault(file string) (*Config, error) {
cfg.Runner.FetchInterval = 2 * time.Second
}
if cfg.Runner.FetchIntervalMax <= 0 {
cfg.Runner.FetchIntervalMax = 5 * time.Second
cfg.Runner.FetchIntervalMax = time.Minute
}
if cfg.Runner.WorkdirCleanupAge == 0 && !definedRunnerKeys["workdir_cleanup_age"] {
cfg.Runner.WorkdirCleanupAge = 24 * time.Hour