mirror of
https://github.com/systemd/systemd.git
synced 2024-10-27 10:25:37 +03:00
job: start job timer when we begin running the job, not already when we add it to the queue of jobs
This commit is contained in:
parent
b61e476f51
commit
23e1e0c4a3
@ -376,6 +376,7 @@ int job_run_and_invalidate(Job *j) {
|
|||||||
|
|
||||||
j->state = JOB_RUNNING;
|
j->state = JOB_RUNNING;
|
||||||
job_add_to_dbus_queue(j);
|
job_add_to_dbus_queue(j);
|
||||||
|
job_start_timer(j);
|
||||||
|
|
||||||
/* While we execute this operation the job might go away (for
|
/* While we execute this operation the job might go away (for
|
||||||
* example: because it is replaced by a new, conflicting
|
* example: because it is replaced by a new, conflicting
|
||||||
@ -394,6 +395,7 @@ int job_run_and_invalidate(Job *j) {
|
|||||||
* wait */
|
* wait */
|
||||||
if (r == -EBADR)
|
if (r == -EBADR)
|
||||||
r = 0;
|
r = 0;
|
||||||
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case JOB_VERIFY_ACTIVE: {
|
case JOB_VERIFY_ACTIVE: {
|
||||||
|
@ -1216,7 +1216,6 @@ static int transaction_apply(Manager *m) {
|
|||||||
|
|
||||||
job_add_to_run_queue(j);
|
job_add_to_run_queue(j);
|
||||||
job_add_to_dbus_queue(j);
|
job_add_to_dbus_queue(j);
|
||||||
job_start_timer(j);
|
|
||||||
|
|
||||||
log_debug("Installed new job %s/%s as %u", j->unit->meta.id, job_type_to_string(j->type), (unsigned) j->id);
|
log_debug("Installed new job %s/%s as %u", j->unit->meta.id, job_type_to_string(j->type), (unsigned) j->id);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user