diff options
author | Jon Turney <jon.turney@dronecode.org.uk> | 2023-06-10 16:12:24 +0300 |
---|---|---|
committer | Jon Turney <jon.turney@dronecode.org.uk> | 2023-06-10 16:12:43 +0300 |
commit | c5e4413e80202522d881fe1673f5823031ce79da (patch) | |
tree | 7e67ec124ac67b77542bb2e8247ae32a8f5f472d | |
parent | 2e62f47252fd09c954ce4b3adc110414ce816a4d (diff) |
Reduce scope of scallwag_db transaction lock
If multiple deploys are ready simultaneously, don't hold the lock over
all of them.
-rw-r--r-- | calm/scallywag_db.py | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/calm/scallywag_db.py b/calm/scallywag_db.py index a310c55..ceb20da 100644 --- a/calm/scallywag_db.py +++ b/calm/scallywag_db.py @@ -52,5 +52,4 @@ def do_deploys(cb): status = 'deploy failed' conn.execute("UPDATE jobs SET status = ? WHERE id = ?", (status, r.id)) - - conn.commit() + conn.commit() |