mirror of https://github.com/rq/rq.git
Improving logging.
- Include worker key in worker startup log statement. - Added a notification to make it more clear when a 'burst' worker dies.
This commit is contained in:
parent
cff6fbff41
commit
fd1dca40b9
|
@ -394,7 +394,7 @@ class Worker(object):
|
|||
|
||||
did_perform_work = False
|
||||
self.register_birth()
|
||||
self.log.info('RQ worker started, version %s' % VERSION)
|
||||
self.log.info("RQ worker, '%s', started, version %s" % (self.key, VERSION))
|
||||
self.set_state(WorkerStatus.STARTED)
|
||||
|
||||
try:
|
||||
|
@ -410,6 +410,8 @@ class Worker(object):
|
|||
|
||||
result = self.dequeue_job_and_maintain_ttl(timeout)
|
||||
if result is None:
|
||||
if burst:
|
||||
self.log.info("RQ worker, '%s', has died." % self.key)
|
||||
break
|
||||
except StopRequested:
|
||||
break
|
||||
|
|
Loading…
Reference in New Issue