job: Fix job state update
Previously, if `old_state == new_state` the job metadata wasn't reinserted. Just `get_mut` instead of removing and reinserting.
This commit is contained in:
parent
513ffd1f12
commit
bf95e2dce8
1 changed files with 1 additions and 3 deletions
|
@ -367,7 +367,7 @@ impl JobMonitor {
|
||||||
message: Option<String>,
|
message: Option<String>,
|
||||||
noop: bool,
|
noop: bool,
|
||||||
) {
|
) {
|
||||||
let mut metadata = self.jobs.remove(&job_id).unwrap();
|
let mut metadata = self.jobs.get_mut(&job_id).unwrap();
|
||||||
let old_state = metadata.state;
|
let old_state = metadata.state;
|
||||||
|
|
||||||
if old_state == new_state {
|
if old_state == new_state {
|
||||||
|
@ -407,8 +407,6 @@ impl JobMonitor {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
self.jobs.insert(job_id, metadata);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Updates the user-visible job statistics output.
|
/// Updates the user-visible job statistics output.
|
||||||
|
|
Loading…
Reference in a new issue