rest-server: cleanup_old_tasks: improve error handling
by not bubbling up most errors, and continuing on. this avoids that we stop cleaning up because e.g. one directory was missing. Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
This commit is contained in:
committed by
Thomas Lamprecht
parent
b23adfd4ee
commit
baefc29544
@ -900,7 +900,7 @@ async fn schedule_task_log_rotate() {
|
||||
|
||||
if has_rotated {
|
||||
task_log!(worker, "cleaning up old task logs");
|
||||
if let Err(err) = cleanup_old_tasks(true) {
|
||||
if let Err(err) = cleanup_old_tasks(&worker, true) {
|
||||
task_warn!(worker, "could not completely cleanup old tasks: {}", err);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user