Skip to content

Commit

Permalink
[BugFix] Fix message receipt in code-upload worker (#4176)
Browse files Browse the repository at this point in the history
  • Loading branch information
gchhablani authored Sep 22, 2023
1 parent 2be6474 commit 1b85045
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion scripts/workers/code_upload_submission_worker.py
Original file line number Diff line number Diff line change
Expand Up @@ -765,6 +765,7 @@ def main():
try:
# Fetch the last job name from the list as it is the latest running job
job_name = submission.get("job_name")
message_receipt_handle = message.get("receipt_handle")
if job_name:
latest_job_name = job_name[-1]
delete_job(api_instance, latest_job_name)
Expand All @@ -773,7 +774,6 @@ def main():
"No job name found corresponding to submission: {} with status: {}."
"Deleting it from queue.".format(submission_pk, submission.get("status"))
)
message_receipt_handle = message.get("receipt_handle")
evalai.delete_message_from_sqs_queue(
message_receipt_handle
)
Expand Down

0 comments on commit 1b85045

Please sign in to comment.