0.12.0: FIFO job retention (job_keep), clear-finished button, vmm-ctl prune
This commit is contained in:
1 parent
5dc6bfb5a2
commit
a1b4e884da
9 files changed
+83
-3
No files matched your search
@@ -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 {
|
||||
|
||||
Reference in new issue
Block a user