Merge pull request #836 from fate0/master

fix uncaught StopRequested during send heartbeat
main
Selwin Ong 8 years ago committed by GitHub
commit a3e1ba9450

@ -466,15 +466,15 @@ class Worker(object):
if burst: if burst:
self.log.info("RQ worker {0!r} done, quitting".format(self.key)) self.log.info("RQ worker {0!r} done, quitting".format(self.key))
break break
job, queue = result
self.execute_job(job, queue)
self.heartbeat()
did_perform_work = True
except StopRequested: except StopRequested:
break break
job, queue = result
self.execute_job(job, queue)
self.heartbeat()
did_perform_work = True
finally: finally:
if not self.is_horse: if not self.is_horse:
self.register_death() self.register_death()

Loading…
Cancel
Save