[pbs-devel] [PATCH proxmox-backup 2/2] api2/config/datastore: use update_job_last_run_time for schedules
Dominik Csapak
d.csapak at proxmox.com
Mon Apr 26 10:21:06 CEST 2021
this way, the api call does not error out when the file is locked
currently (which means that job is running and we do not need
to update the time)
Signed-off-by: Dominik Csapak <d.csapak at proxmox.com>
---
src/api2/config/datastore.rs | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/api2/config/datastore.rs b/src/api2/config/datastore.rs
index 3a3dc176..6ca98b53 100644
--- a/src/api2/config/datastore.rs
+++ b/src/api2/config/datastore.rs
@@ -375,11 +375,11 @@ pub fn update_datastore(
// we want to reset the statefiles, to avoid an immediate action in some cases
// (e.g. going from monthly to weekly in the second week of the month)
if gc_schedule_changed {
- jobstate::create_state_file("garbage_collection", &name)?;
+ jobstate::update_job_last_run_time("garbage_collection", &name)?;
}
if prune_schedule_changed {
- jobstate::create_state_file("prune", &name)?;
+ jobstate::update_job_last_run_time("prune", &name)?;
}
Ok(())
--
2.20.1
More information about the pbs-devel
mailing list