Show More
@@ -86,6 +86,7 b' class BackgroundJobManager(object):' | |||
|
86 | 86 | self._s_running = BackgroundJobBase.stat_running_c |
|
87 | 87 | self._s_completed = BackgroundJobBase.stat_completed_c |
|
88 | 88 | self._s_dead = BackgroundJobBase.stat_dead_c |
|
89 | self._current_job_id = 0 | |
|
89 | 90 | |
|
90 | 91 | @property |
|
91 | 92 | def running(self): |
@@ -187,7 +188,8 b' class BackgroundJobManager(object):' | |||
|
187 | 188 | |
|
188 | 189 | if kwargs.get('daemon', False): |
|
189 | 190 | job.daemon = True |
|
190 | job.num = len(self.all)+1 if self.all else 0 | |
|
191 | job.num = self._current_job_id | |
|
192 | self._current_job_id += 1 | |
|
191 | 193 | self.running.append(job) |
|
192 | 194 | self.all[job.num] = job |
|
193 | 195 | debug('Starting job # %s in a separate thread.' % job.num) |
General Comments 0
You need to be logged in to leave comments.
Login now