Skip to content

Commit

Permalink
Use justin.update() to get deadlock retries
Browse files Browse the repository at this point in the history
  • Loading branch information
Andrew-McNab-UK committed May 28, 2024
1 parent b83f013 commit 58acee1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion services/justin-wsgi-allocator
Original file line number Diff line number Diff line change
Expand Up @@ -1252,7 +1252,7 @@ def findBestFile(jobDict):
"WHERE state='unallocated' AND "
"file_id=" + str(replicaRows[0]['file_id'])
)
affectedRows = justin.cur.execute(query)
affectedRows = justin.update(query)
except Exception as e:
# If anything goes wrong, we stop straightaway
return { 'error_message': 'Failed recording state change: ' + str(e) }
Expand Down

0 comments on commit 58acee1

Please sign in to comment.