Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/cygwin-apps/calm.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJon Turney <jon.turney@dronecode.org.uk>2023-06-10 16:12:24 +0300
committerJon Turney <jon.turney@dronecode.org.uk>2023-06-10 16:12:43 +0300
commitc5e4413e80202522d881fe1673f5823031ce79da (patch)
tree7e67ec124ac67b77542bb2e8247ae32a8f5f472d
parent2e62f47252fd09c954ce4b3adc110414ce816a4d (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.py3
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()