Move security notification work into its own method to allow for return values
Fixes #1302 Fixes #1304
This commit is contained in:
parent
685dd1a925
commit
d62ec22fc9
3 changed files with 15 additions and 3 deletions
|
@ -44,7 +44,11 @@ class QueueWorker(Worker):
|
|||
self.add_operation(self.run_watchdog, self._watchdog_period_seconds)
|
||||
|
||||
def process_queue_item(self, job_details):
|
||||
""" Return True if complete, False if it should be retried. """
|
||||
""" Processes the work for the given job. If the job fails and should be retried,
|
||||
this method should raise a WorkerUnhealthyException. If the job should be marked
|
||||
as permanently failed, it should raise a JobException. Otherwise, a successful return
|
||||
of this method will remove the job from the queue as completed.
|
||||
"""
|
||||
raise NotImplementedError('Workers must implement run.')
|
||||
|
||||
def watchdog(self):
|
||||
|
|
Reference in a new issue