aboutsummaryrefslogtreecommitdiff
path: root/utils/submit-grid-jobs-queue
diff options
context:
space:
mode:
authortlatorre <tlatorre@uchicago.edu>2020-10-13 09:43:01 -0500
committertlatorre <tlatorre@uchicago.edu>2020-10-13 09:43:01 -0500
commit776fc9f600fd50fc2ff4076d135e7293bb035150 (patch)
treec8e0721ba024349081983c08d092b9c60e70cf6f /utils/submit-grid-jobs-queue
parent4d69692064844760f00e263ba7df39f95e7bd295 (diff)
downloadsddm-776fc9f600fd50fc2ff4076d135e7293bb035150.tar.gz
sddm-776fc9f600fd50fc2ff4076d135e7293bb035150.tar.bz2
sddm-776fc9f600fd50fc2ff4076d135e7293bb035150.zip
fix bug in submit-grid-jobs queue when running many jobs
Diffstat (limited to 'utils/submit-grid-jobs-queue')
-rwxr-xr-xutils/submit-grid-jobs-queue3
1 files changed, 2 insertions, 1 deletions
diff --git a/utils/submit-grid-jobs-queue b/utils/submit-grid-jobs-queue
index c99a00d..54af499 100755
--- a/utils/submit-grid-jobs-queue
+++ b/utils/submit-grid-jobs-queue
@@ -444,5 +444,6 @@ if __name__ == '__main__':
except subprocess.CalledProcessError:
raise
else:
- c.execute("UPDATE state SET state = 'RUNNING', nretry = COALESCE(nretry + 1,0) WHERE id IN (%s)" % (','.join(['?']*len(results))), [row['id'] for row in results])
+ for row in results:
+ c.execute("UPDATE state SET state = 'RUNNING', nretry = COALESCE(nretry + 1,0) WHERE id = ?", (row['id'],))
conn.commit()