##// END OF EJS Templates
Fixes #11603...
Nikita Bezdolniy -
Show More
@@ -86,6 +86,7 b' class BackgroundJobManager(object):'
86 self._s_running = BackgroundJobBase.stat_running_c
86 self._s_running = BackgroundJobBase.stat_running_c
87 self._s_completed = BackgroundJobBase.stat_completed_c
87 self._s_completed = BackgroundJobBase.stat_completed_c
88 self._s_dead = BackgroundJobBase.stat_dead_c
88 self._s_dead = BackgroundJobBase.stat_dead_c
89 self._current_job_id = 0
89
90
90 @property
91 @property
91 def running(self):
92 def running(self):
@@ -187,7 +188,8 b' class BackgroundJobManager(object):'
187
188
188 if kwargs.get('daemon', False):
189 if kwargs.get('daemon', False):
189 job.daemon = True
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 self.running.append(job)
193 self.running.append(job)
192 self.all[job.num] = job
194 self.all[job.num] = job
193 debug('Starting job # %s in a separate thread.' % job.num)
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