Fix error in double upload
If more than one uploadreviewtask is submitted for a message, the message will not exist for the second or later task. In that case, do not throw a traceback into the log. Change-Id: I53bc0ff2b9e0bbdea5eeaa823a438cd48d337fa4
This commit is contained in:
parent
dfff0e8fc3
commit
b16a60d383
@ -930,6 +930,10 @@ class UploadReviewTask(Task):
|
||||
|
||||
with app.db.getSession() as session:
|
||||
message = session.getMessage(self.message_key)
|
||||
if message is None:
|
||||
self.log.debug("Message %s for change %s has already been uploaded" % (
|
||||
self.message_key, change.id))
|
||||
return
|
||||
change = message.revision.change
|
||||
if not change.held:
|
||||
self.log.debug("Syncing %s to find out if it should be held" % (change.id,))
|
||||
|
Loading…
Reference in New Issue
Block a user