Skip to content
8 linesCodeBlameRaw
1-- Job logs are deleted LOG_RETENTION_DAYS after their job finished
2-- (src/retention.rs). A job, or an earlier attempt, whose log is gone is
3-- marked so the hourly sweep does not look at it again; the job itself,
4-- its steps and its summary stay.
5ALTER TABLE jobs ADD COLUMN logs_purged_at TEXT;
6ALTER TABLE job_attempts ADD COLUMN logs_purged_at TEXT;
7CREATE INDEX IF NOT EXISTS jobs_logs_due ON jobs (finished_at) WHERE logs_purged_at IS NULL;
8CREATE INDEX IF NOT EXISTS job_attempts_logs_due ON job_attempts (finished_at) WHERE logs_purged_at IS NULL;