feat(api): add /v1/maintenance policies and run endpoints
OpenAPI, httpapi CRUD/run/dry-run, job maintenance_policy_run и audit с policy_id. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
1 parent
6510a9ca22
commit
f548d0671f
8 files changed
+653
-15
No files matched your search
@@ -61,6 +61,7 @@ const (
|
||||
KindPostgresAnalyze = "postgres_analyze"
|
||||
KindPostgresReindex = "postgres_reindex"
|
||||
KindPostgresCleanup = "postgres_cleanup"
|
||||
KindMaintenancePolicyRun = "maintenance_policy_run"
|
||||
)
|
||||
|
||||
// Worker executes queued jobs against store.Backend (memory or SQL).
|
||||
@@ -188,6 +189,8 @@ func (w *Worker) Process(j *Job) {
|
||||
w.runPostgresMaint(j, "reindex")
|
||||
case KindPostgresCleanup:
|
||||
w.runPostgresCleanup(j)
|
||||
case KindMaintenancePolicyRun:
|
||||
w.runMaintenancePolicy(j)
|
||||
default:
|
||||
j.Fail("unknown job kind")
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user