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:
Joseph Schorr 2014-09-22 12:52:57 -04:00 committed by Jake Moshenko
parent 8dd2330ce7
commit ba0963a81c
6 changed files with 62 additions and 60 deletions

View file

@ -347,7 +347,7 @@ class RepositoryBuild(BaseModel):
class QueueItem(BaseModel):
queue_name = CharField(index=True, max_length=1024)
body = TextField()
available_after = DateTimeField(default=datetime.now, index=True)
available_after = DateTimeField(default=datetime.utcnow, index=True)
available = BooleanField(default=True, index=True)
processing_expires = DateTimeField(null=True, index=True)
retries_remaining = IntegerField(default=5)