removed singleton and passed instance of TaskExecutor to workers

This commit is contained in:
Rafael.Timmerberg 2013-12-11 03:41:56 +01:00
commit 3745c27c9a
4 changed files with 13 additions and 31 deletions

View file

@ -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: