|
|
|
@ -463,7 +463,6 @@ class Worker(object):
|
|
|
|
|
"""
|
|
|
|
|
setup_loghandlers(logging_level, date_format, log_format)
|
|
|
|
|
self._install_signal_handlers()
|
|
|
|
|
|
|
|
|
|
did_perform_work = False
|
|
|
|
|
self.register_birth()
|
|
|
|
|
self.log.info("RQ worker {0!r} started, version {1}".format(self.key, VERSION))
|
|
|
|
@ -671,13 +670,12 @@ class Worker(object):
|
|
|
|
|
# that are different from the worker.
|
|
|
|
|
random.seed()
|
|
|
|
|
|
|
|
|
|
try:
|
|
|
|
|
self.setup_work_horse_signals()
|
|
|
|
|
|
|
|
|
|
self._is_horse = True
|
|
|
|
|
self.log = logger
|
|
|
|
|
|
|
|
|
|
success = self.perform_job(job, queue)
|
|
|
|
|
|
|
|
|
|
self.perform_job(job, queue)
|
|
|
|
|
finally:
|
|
|
|
|
# os._exit() is the way to exit from childs after a fork(), in
|
|
|
|
|
# constrast to the regular sys.exit()
|
|
|
|
|
os._exit(0)
|
|
|
|
|