feat(app): wire acp_events_purge runner into jobs scheduler

This commit is contained in:
2026-05-07 17:47:50 +08:00
parent 4c19ce29ca
commit faebfc3135
5 changed files with 40 additions and 0 deletions
+8
View File
@@ -120,6 +120,13 @@ type JobPurgeConfig struct {
CompletedRetention time.Duration
}
// AcpEventsPurgeConfig extends RunnerConfig with acp_events retention.
type AcpEventsPurgeConfig struct {
Enabled bool
Interval time.Duration
Retention time.Duration
}
// Config is the full jobs.Module configuration.
type Config struct {
Enabled bool
@@ -130,4 +137,5 @@ type Config struct {
AttachmentCleanup AttachmentCleanupConfig
JobReaper JobReaperConfig
JobPurge JobPurgeConfig
AcpEventsPurge AcpEventsPurgeConfig
}
+2
View File
@@ -129,6 +129,8 @@ func scheduleEntry(cfg Config, name string) (schedEntry, bool) {
return schedEntry{cfg.JobReaper.Interval, cfg.JobReaper.Enabled}, true
case "job_purge":
return schedEntry{cfg.JobPurge.Interval, cfg.JobPurge.Enabled}, true
case "acp_events_purge":
return schedEntry{cfg.AcpEventsPurge.Interval, cfg.AcpEventsPurge.Enabled}, true
}
return schedEntry{0, false}, false
}