clear out work_data on each new job

This commit is contained in:
Joshua Hesketh 2013-08-26 11:05:38 +10:00
parent 76733ed58b
commit dff74c7eae

View File

@ -97,10 +97,12 @@ class Runner(threading.Thread):
def run(self):
while True and not self.stopped():
try:
# gearman_worker.getJob() blocks until a job is available
self.log.debug("Waiting for job")
# Reset job information:
self.current_step = 0
self.cancelled = False
self.work_data = None
# gearman_worker.getJob() blocks until a job is available
self.log.debug("Waiting for job")
self.job = self.gearman_worker.getJob()
self._handle_job()
except: