cleanup: replace id from do_sync_job with info from job

we already have it inside the job itself

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
This commit is contained in:
Dominik Csapak
2020-08-13 14:30:18 +02:00
committed by Dietmar Maurer
parent 77bd2a469c
commit 713b66b6ed
4 changed files with 15 additions and 8 deletions

View File

@ -232,6 +232,14 @@ impl Job {
self.write_state()
}
pub fn jobtype(&self) -> &str {
&self.jobtype
}
pub fn jobname(&self) -> &str {
&self.jobname
}
fn write_state(&mut self) -> Result<(), Error> {
let serialized = serde_json::to_string(&self.state)?;
let path = get_path(&self.jobtype, &self.jobname);