Use a separate db connection in channel-derivations-by-system-promise

As this can run in parallel with something else using conn.
This commit is contained in:
Christopher Baines 2024-11-02 09:35:23 +00:00
parent 6265c37e89
commit ed6a4b1577

View file

@ -2214,11 +2214,14 @@ SELECT 1 FROM derivation_source_file_nars WHERE derivation_source_file_id = $1"
(define channel-derivations-by-system-promise (define channel-derivations-by-system-promise
(fibers-delay (fibers-delay
(lambda () (lambda ()
(channel->source-and-derivations-by-system (with-postgresql-connection
conn "load-new-guix-revision channel->source-and-derivations-by-system"
channel-for-commit (lambda (channel-conn)
fetch-with-authentication? (channel->source-and-derivations-by-system
#:parallelism parallelism)))) channel-conn
channel-for-commit
fetch-with-authentication?
#:parallelism parallelism))))))
(define guix-revision-id-promise (define guix-revision-id-promise
(fibers-delay (fibers-delay