removed singleton and passed instance of TaskExecutor to workers
This commit is contained in:
parent
c604d4da4d
commit
3745c27c9a
4 changed files with 13 additions and 31 deletions
|
|
@ -114,7 +114,7 @@ def main():
|
|||
logger.error(msg)
|
||||
exit()
|
||||
|
||||
task = TaskExecutor.Instance()
|
||||
executor = TaskExecutor()
|
||||
#logger.debug("task executor instance :%s", str(task))
|
||||
|
||||
job_count = 0
|
||||
|
|
@ -153,7 +153,7 @@ def main():
|
|||
new_start_date = start_date + datetime.timedelta(seconds=time_delta)
|
||||
|
||||
worker = workers[instance]
|
||||
worker.create_job(jobs, service, host, hostgroup, core, period, start_date=new_start_date)
|
||||
worker.create_job(jobs, service, host, hostgroup, core, period, start_date=new_start_date, executor=executor)
|
||||
|
||||
instance += 1
|
||||
if instance == args.instances:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue