core/manager: Make sure jobs statistics are not double after daemon-reload
We add n_installed_jobs and n_failed_jobs to our inner state after deserialization. This is fine during daemon-reexec when we start with clear Manager (and some jobs possibly queued before deserialization), however, daemon-reload works with the same manager and adding the values would effectively double the counters. Reset the counters before we deserialize and add their values again.
This commit is contained in:
parent
1a0d353b44
commit
1e75824cb0
|
@ -1234,6 +1234,8 @@ static void manager_clear_jobs_and_units(Manager *m) {
|
|||
|
||||
m->n_on_console = 0;
|
||||
m->n_running_jobs = 0;
|
||||
m->n_installed_jobs = 0;
|
||||
m->n_failed_jobs = 0;
|
||||
}
|
||||
|
||||
Manager* manager_free(Manager *m) {
|
||||
|
|
Loading…
Reference in a new issue