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

@@ -48,6 +48,12 @@ func TestLoadDefault_DefaultsWorkdirCleanupAge(t *testing.T) {
assert.Equal(t, 10*time.Minute, cfg.Runner.IdleCleanupInterval)
}
func TestLoadDefault_DefaultsIdleFetchBackoffMax(t *testing.T) {
cfg, err := LoadDefault("")
require.NoError(t, err)
assert.Equal(t, time.Minute, cfg.Runner.FetchIntervalMax)
}
func TestLoadDefault_UsesConfiguredWorkdirCleanupAge(t *testing.T) {
dir := t.TempDir()
path := filepath.Join(dir, "config.yaml")