Add remove current_job based on the correct upstream master branch

main
Christophe Olinger 9 years ago
parent 2485334100
commit 3e586bd6d6

@ -594,6 +594,7 @@ class Worker(object):
except Exception: except Exception:
job.set_status(JobStatus.FAILED, pipeline=pipeline) job.set_status(JobStatus.FAILED, pipeline=pipeline)
started_job_registry.remove(job, pipeline=pipeline) started_job_registry.remove(job, pipeline=pipeline)
self.set_current_job_id(None, pipeline=pipeline)
try: try:
pipeline.execute() pipeline.execute()
except Exception: except Exception:

@ -157,6 +157,7 @@ class TestWorker(RQTestCase):
# Postconditions # Postconditions
self.assertEqual(q.count, 0) self.assertEqual(q.count, 0)
self.assertEqual(failed_q.count, 1) self.assertEqual(failed_q.count, 1)
self.assertEquals(w.get_current_job_id(), None)
# Check the job # Check the job
job = Job.fetch(job.id) job = Job.fetch(job.id)

Loading…
Cancel
Save