From 98146bf0609558c5a625165579e285c9de061b96 Mon Sep 17 00:00:00 2001 From: leozeli Date: Wed, 4 Mar 2026 10:42:54 +0800 Subject: [PATCH] refactor: Increase default task cleanup interval and retention time --- pkg/agent/loop.go | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/pkg/agent/loop.go b/pkg/agent/loop.go index 8d52e6e52..44a2a402e 100644 --- a/pkg/agent/loop.go +++ b/pkg/agent/loop.go @@ -358,16 +358,15 @@ func (al *AgentLoop) Stop() { // runTaskCleanup periodically cleans up old completed tasks (Phase 2) func (al *AgentLoop) runTaskCleanup(ctx context.Context) { - // Get cleanup interval from config, default to 5 minutes intervalMins := al.cfg.Agents.Defaults.TaskCleanupIntervalMins if intervalMins <= 0 { - intervalMins = 5 + intervalMins = 30 } - // Get retention time from config, default to 1 hour + // Get retention time from config, default to 24 hour retentionHours := al.cfg.Agents.Defaults.TaskRetentionHours if retentionHours <= 0 { - retentionHours = 1 + retentionHours = 24 } ticker := time.NewTicker(time.Duration(intervalMins) * time.Minute)