diff options
author | Christopher Baines <mail@cbaines.net> | 2021-03-30 09:18:56 +0100 |
---|---|---|
committer | Christopher Baines <mail@cbaines.net> | 2021-03-30 09:18:56 +0100 |
commit | f8bb56d192923a1a1f5550eff21fb2ab2a4457c9 (patch) | |
tree | d7ab5bd2a43ca53f53dfc3d1a4ce95808ef75ef2 | |
parent | 2dfb4c66042e2ad851fce03108322729354b3bb1 (diff) | |
download | build-coordinator-f8bb56d192923a1a1f5550eff21fb2ab2a4457c9.tar build-coordinator-f8bb56d192923a1a1f5550eff21fb2ab2a4457c9.tar.gz |
Stop quoting number build ids
-rw-r--r-- | guix-build-coordinator/datastore/sqlite.scm | 18 |
1 files changed, 8 insertions, 10 deletions
diff --git a/guix-build-coordinator/datastore/sqlite.scm b/guix-build-coordinator/datastore/sqlite.scm index d01fd6f..467e236 100644 --- a/guix-build-coordinator/datastore/sqlite.scm +++ b/guix-build-coordinator/datastore/sqlite.scm @@ -1000,8 +1000,8 @@ SELECT agent_id, result, COUNT(*) FROM build_results GROUP BY agent_id, result" " INSERT INTO build_results ( build_id, agent_id, result, failure_reason -) VALUES ('" - (number->string (db-find-build-id db build-uuid)) "', '" +) VALUES (" + (number->string (db-find-build-id db build-uuid)) ", '" agent-id "', '" result "', " (if failure-reason @@ -1020,9 +1020,9 @@ INSERT INTO build_results ( db (string-append " -DELETE FROM allocated_builds WHERE build_id = '" +DELETE FROM allocated_builds WHERE build_id = " (number->string (db-find-build-id db build-uuid)) - "' AND agent_id = '" + " AND agent_id = '" agent-id "'")))) #t) @@ -1042,7 +1042,7 @@ SET processed = 1 " (if end-time (string-append ", end_time = '" end-time "'") "") " -WHERE uuid = '" (number->string (db-find-build-id db build-uuid)) "'")))) +WHERE id = " (number->string (db-find-build-id db build-uuid)))))) #t) (define-method (datastore-delete-relevant-outputs-from-unbuilt-outputs @@ -1145,8 +1145,8 @@ VALUES " " INSERT INTO build_starts ( build_id, agent_id, start_time -) VALUES ('" - (number->string (db-find-build-id db build-uuid)) "', '" +) VALUES (" + (number->string (db-find-build-id db build-uuid)) ", '" agent-id "', " "datetime('now')" ")")) @@ -2600,9 +2600,7 @@ DELETE FROM build_allocation_plan WHERE build_id IN (" (string-join (map (lambda (build-uuid) - (string-append "'" - (number->string (db-find-build-id db build-uuid)) - "'")) + (number->string (db-find-build-id db build-uuid))) build-uuids) ", ") ")"))))) |