api2/config/datastore: use update_job_last_run_time for schedules
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@proxmox.com>
This commit is contained in:
		
				
					committed by
					
						 Dietmar Maurer
						Dietmar Maurer
					
				
			
			
				
	
			
			
			
						parent
						
							37a634f550
						
					
				
				
					commit
					a588b67906
				
			| @ -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(()) | ||||
|  | ||||
		Reference in New Issue
	
	Block a user