]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core-contrib.git/commitdiff
runqueue.py: Fire the task started event from the worker process, not the server...
authorRichard Purdie <rpurdie@linux.intel.com>
Sat, 6 Dec 2008 12:01:36 +0000 (12:01 +0000)
committerRichard Purdie <rpurdie@linux.intel.com>
Sat, 6 Dec 2008 12:01:36 +0000 (12:01 +0000)
lib/bb/runqueue.py

index dfa9e2a698f92659b1578d509bb667a3abf6b4d4..20af618d98f313bb4ae80e20408d055dae677465 100644 (file)
@@ -971,8 +971,6 @@ class RunQueue:
                     self.stats.taskSkipped()
                     continue
 
-                bb.event.fire(runQueueTaskStarted(task, self.stats, self, self.cfgData))
-                bb.msg.note(1, bb.msg.domain.RunQueue, "Running task %d of %d (ID: %s, %s)" % (self.stats.completed + self.stats.active + 1, self.stats.total, task, self.get_user_idstring(task)))
                 sys.stdout.flush()
                 sys.stderr.flush()
                 try: 
@@ -984,6 +982,12 @@ class RunQueue:
                     # events
                     bb.event.worker_pid = os.getpid()
 
+                    bb.event.fire(runQueueTaskStarted(task, self.stats, self, self.cfgData))
+                    bb.msg.note(1, bb.msg.domain.RunQueue,
+                                "Running task %d of %d (ID: %s, %s)" % (self.stats.completed + self.stats.active + 1,
+                                                                        self.stats.total,
+                                                                        task,
+                                                                        self.get_user_idstring(task)))
                     self.state = runQueueChildProcess
                     # Make the child the process group leader
                     os.setpgid(0, 0)