Update the worker code to better handle exceptions, fix the utcdate issue and make sure we send the proper retry. Also updates notification workers to send JobExceptions rather than returning true or false
This commit is contained in:
parent
8c00eabedd
commit
f23038c6ee
6 changed files with 62 additions and 60 deletions
|
@ -68,9 +68,8 @@ class WorkQueue(object):
|
|||
'retries_remaining': retries_remaining,
|
||||
}
|
||||
|
||||
if available_after:
|
||||
available_date = datetime.utcnow() + timedelta(seconds=available_after)
|
||||
params['available_after'] = available_date
|
||||
available_date = datetime.utcnow() + timedelta(seconds=available_after or 0)
|
||||
params['available_after'] = available_date
|
||||
|
||||
with self._transaction_factory(db):
|
||||
QueueItem.create(**params)
|
||||
|
|
Reference in a new issue