Add more check conditions for unhealthy workers and make the messaging better.
This commit is contained in:
parent
67905c277e
commit
510bbe7889
2 changed files with 7 additions and 5 deletions
|
@ -135,8 +135,8 @@ class Worker(object):
|
|||
|
||||
except WorkerUnhealthyException:
|
||||
logger.error('The worker has encountered an error and will not take new jobs. Job is being requeued.')
|
||||
self._stop.set()
|
||||
self.mark_current_incomplete(restore_retry=True)
|
||||
self._stop.set()
|
||||
|
||||
finally:
|
||||
# Close the db handle periodically
|
||||
|
|
Reference in a new issue