From: Lennart Poettering Date: Wed, 23 Feb 2011 17:46:57 +0000 (+0100) Subject: job: start job timer when we begin running the job, not already when we add it to... X-Git-Tag: v19~26 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=23e1e0c4a3bc93fb841ac9575953ed5d0ef5282d;p=systemd job: start job timer when we begin running the job, not already when we add it to the queue of jobs --- diff --git a/src/job.c b/src/job.c index 4700aab6..ec57144c 100644 --- a/src/job.c +++ b/src/job.c @@ -376,6 +376,7 @@ int job_run_and_invalidate(Job *j) { j->state = JOB_RUNNING; job_add_to_dbus_queue(j); + job_start_timer(j); /* While we execute this operation the job might go away (for * example: because it is replaced by a new, conflicting @@ -394,6 +395,7 @@ int job_run_and_invalidate(Job *j) { * wait */ if (r == -EBADR) r = 0; + break; case JOB_VERIFY_ACTIVE: { diff --git a/src/manager.c b/src/manager.c index f266aaa0..6759bbac 100644 --- a/src/manager.c +++ b/src/manager.c @@ -1216,7 +1216,6 @@ static int transaction_apply(Manager *m) { job_add_to_run_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); }