0.12.0: FIFO job retention (job_keep), clear-finished button, vmm-ctl prune

This commit is contained in:
Claw committed 2026-11-17 21:38:56 +01:00
1 parent 5dc6bfb5a2
commit a1b4e884da
9 files changed
+83 -3

No files matched your search

+7
View File
@@ -185,6 +185,13 @@ switch ($cmd) {
echo $d['ok'] ? "cancel requested\n" : ('error: ' . $d['error'] . "\n");
});
case 'prune':
$keep = $arg !== '' ? (int)$arg : (int)(vmm_config()['job_keep'] ?? 100);
$res = vmm_job_prune($keep);
out($res, $json, static function (array $d): void {
printf("removed %d, kept %d\n", $d['removed'], $d['kept']);
});
case 'recover':
$fixed = vmm_job_recover();
out(['ok' => true, 'fixed' => $fixed], $json, static function (array $d): void {