fix(server): show the audit clean-up's real age limit and lock it before the first pass
Settings › Logs › Keep audit showed ServerOptions.AuditRetentionDays, a second copy of the audit clean-up schedule's age limit. Edits made on Jobs › Scheduled never reached it, so the panel could say "kept forever" while entries were being deleted every night. Saving 0 there then changed nothing, because the endpoint only compared against the stale option value. - GET and PUT /server/settings now report the schedule's limit in force (0 while the schedule is off). Saving compares against that value. A value sent back unchanged leaves the server.json reset default and the env lock alone. A new value sets the schedule and becomes the reset default. - ApplyAgeAsync also turns the schedule on when it already holds the days but is off. - CHRONOS_AUDIT_RETENTION_DAYS is now applied before the scheduler's first pass, through a new Scheduler.StartAsync overload with a beforeFirstPass hook. Before, a missed 04:30 run was caught up at start with the stale days, which could delete entries the variable says to keep. While the variable fixes a limit above 0, turning the schedule off is a 409 setting_locked. - Corrected the comments in SchedulerHost, ServerOptions, ServerSettingsStore, LogSettingsDto, the header of settings.js and ARCHITECTURE. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> (cherry picked from commit 490ed286e9f32745174b13b1963d6ec91955196b)
This commit is contained in:
1 parent
ac121acf7c
commit
422f33d5f3
12 files changed
+232
-52
No files matched your search
@@ -1,10 +1,10 @@
|
||||
// Settings (BRIEF §14.8): server name, ports, TLS, discovery, jobs, limits, language, retention, logs. Values fixed by
|
||||
// environment variables are read-only here; ports, TLS and chunk size apply at the next restart. How long job history is
|
||||
// kept is a parameter of the Job history clean-up schedule (Jobs › Scheduled, owner review 2, R10); the audit retention
|
||||
// saved here is the Audit log clean-up schedule's age limit. Jobs run one at a time (owner review 1): the parallelism
|
||||
// (photos at once) and the priority queue apply at once, as do the log levels, retention, size limits and rotation
|
||||
// (owner review 2, R11). About (version, API, database, uptime) is the last group, read-only (owner review 2); #/about
|
||||
// opens here on it.
|
||||
// kept is a parameter of the Job history clean-up schedule (Jobs › Scheduled, owner review 2, R10); Keep audit shows the
|
||||
// Audit log clean-up schedule's age limit (0 while it is off), and saving a new one sets it. Jobs run one at a time
|
||||
// (owner review 1): the parallelism (photos at once) and the priority queue apply at once, as do the log levels,
|
||||
// retention, size limits and rotation (owner review 2, R11). About (version, API, database, uptime) is the last group,
|
||||
// read-only (owner review 2); #/about opens here on it.
|
||||
import { t, applyStrings, languages } from "../i18n.js";
|
||||
import { escapeHtml, attr, toast, errorText, nativeName, fingerprint, formatDuration, markInvalid, clearInvalid, invalidText, escapeReverts, routeParams, PROXY_WARNING } from "../ui.js";
|
||||
import { kindLabel } from "../jobs.js";
|
||||
|
||||
Reference in new issue
Block a user