]> err.no Git - systemd/commitdiff
job: start job timer when we begin running the job, not already when we add it to...
authorLennart Poettering <lennart@poettering.net>
Wed, 23 Feb 2011 17:46:57 +0000 (18:46 +0100)
committerLennart Poettering <lennart@poettering.net>
Wed, 23 Feb 2011 17:46:57 +0000 (18:46 +0100)
src/job.c
src/manager.c

index 4700aab6acfb41963fbc8660a8c579299c370b9c..ec57144cb744743a2d3c8639814673cbdfca4688 100644 (file)
--- 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: {
index f266aaa01c652d8ce2d2e6da24cabed5fc512cfe..6759bbac975c3e22ed8fe1b46b40a1976c5d9dcf 100644 (file)
@@ -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);
         }