diff options
author | Christopher Baines <mail@cbaines.net> | 2023-04-20 23:03:40 +0100 |
---|---|---|
committer | Christopher Baines <mail@cbaines.net> | 2023-04-20 23:03:40 +0100 |
commit | 5f4cf4f32dff033320f2aa8115cf15b6158201d8 (patch) | |
tree | 6022e51ab215839a6d5c8cb19b9e2448fbe7820d /guix-build-coordinator/datastore | |
parent | a877c6b5f60ae6f4d74d9ee0992a220f4f641aba (diff) | |
download | build-coordinator-5f4cf4f32dff033320f2aa8115cf15b6158201d8.tar build-coordinator-5f4cf4f32dff033320f2aa8115cf15b6158201d8.tar.gz |
Revert "Retry inside the worker thread"
As this blocks other database operations that wouldn't wait.
This reverts commit 42bf1086d588081548fb1efb0b4cf1e5ad119763.
Diffstat (limited to 'guix-build-coordinator/datastore')
-rw-r--r-- | guix-build-coordinator/datastore/sqlite.scm | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/guix-build-coordinator/datastore/sqlite.scm b/guix-build-coordinator/datastore/sqlite.scm index 4380c57..ff30ac0 100644 --- a/guix-build-coordinator/datastore/sqlite.scm +++ b/guix-build-coordinator/datastore/sqlite.scm @@ -268,17 +268,17 @@ PRAGMA optimize;"))))) (define-method (datastore-optimize (datastore <sqlite-datastore>)) - (call-with-worker-thread - (slot-ref datastore 'worker-writer-thread-channel) - (lambda (db) - (retry-on-error - (lambda () + (retry-on-error + (lambda () + (call-with-worker-thread + (slot-ref datastore 'worker-writer-thread-channel) + (lambda (db) (db-optimize db (slot-ref datastore 'database-file) - (slot-ref datastore 'metrics-registry))) - #:times 10 - #:delay 0)))) + (slot-ref datastore 'metrics-registry))))) + #:times 10 + #:delay 0)) (define-method (datastore-spawn-fibers (datastore <sqlite-datastore>)) |