Further change job store connection handling
The guix-dameon WAL is still growing excessively, so avoid doing anything with the long running store connection except registering temporary roots.
This commit is contained in:
parent
c18589249f
commit
993887fe0c
2 changed files with 88 additions and 52 deletions
|
|
@ -37,50 +37,66 @@
|
|||
|
||||
(mock
|
||||
((guix-data-service jobs load-new-guix-revision)
|
||||
channel->source-and-derivations-by-system
|
||||
(lambda* (conn store channel fetch-with-authentication?
|
||||
#:key parallelism)
|
||||
(cons
|
||||
"/gnu/store/guix"
|
||||
'(("x86_64-linux"
|
||||
.
|
||||
((manifest-entry-item . "/gnu/store/foo.drv")
|
||||
(profile . "/gnu/store/bar.drv")))))))
|
||||
open-store-connection
|
||||
(lambda ()
|
||||
'fake-store-connection))
|
||||
|
||||
(mock
|
||||
((guix-data-service jobs load-new-guix-revision)
|
||||
channel-derivations-by-system->guix-store-item
|
||||
(lambda (store channel-derivations-by-system)
|
||||
"/gnu/store/test"))
|
||||
channel->source-and-derivations-by-system
|
||||
(lambda* (conn store channel fetch-with-authentication?
|
||||
#:key parallelism)
|
||||
(cons
|
||||
"/gnu/store/guix"
|
||||
'(("x86_64-linux"
|
||||
.
|
||||
((manifest-entry-item . "/gnu/store/foo.drv")
|
||||
(profile . "/gnu/store/bar.drv")))))))
|
||||
|
||||
(mock
|
||||
((guix-data-service jobs load-new-guix-revision)
|
||||
extract-information-from
|
||||
(lambda* (conn store guix-revision-id commit
|
||||
guix-source store-path
|
||||
#:key skip-system-tests?
|
||||
parallelism)
|
||||
#t))
|
||||
channel-derivations-by-system->guix-store-item
|
||||
(lambda (store channel-derivations-by-system)
|
||||
"/gnu/store/test"))
|
||||
|
||||
(mock
|
||||
((guix-data-service model channel-instance)
|
||||
insert-channel-instances
|
||||
(lambda (conn guix-revision-id derivations-by-system)
|
||||
((guix-data-service jobs load-new-guix-revision)
|
||||
extract-information-from
|
||||
(lambda* (conn store guix-revision-id commit
|
||||
guix-source store-path
|
||||
#:key skip-system-tests?
|
||||
parallelism)
|
||||
#t))
|
||||
|
||||
(mock
|
||||
((guix channels)
|
||||
channel-news-for-commit
|
||||
(lambda (channel commit)
|
||||
'()))
|
||||
((guix-data-service model channel-instance)
|
||||
insert-channel-instances
|
||||
(lambda (conn guix-revision-id derivations-by-system)
|
||||
#t))
|
||||
|
||||
(match (enqueue-load-new-guix-revision-job
|
||||
conn
|
||||
(git-repository-url->git-repository-id conn "test-url")
|
||||
"test-commit"
|
||||
"test-source")
|
||||
((id)
|
||||
(process-load-new-guix-revision-job id))))))))))
|
||||
(mock
|
||||
((guix channels)
|
||||
channel-news-for-commit
|
||||
(lambda (channel commit)
|
||||
'()))
|
||||
|
||||
(mock
|
||||
((guix store)
|
||||
add-temp-root
|
||||
(lambda _ #f))
|
||||
|
||||
(mock
|
||||
((guix store)
|
||||
close-connection
|
||||
(lambda _ #f))
|
||||
|
||||
(match (enqueue-load-new-guix-revision-job
|
||||
conn
|
||||
(git-repository-url->git-repository-id conn "test-url")
|
||||
"test-commit"
|
||||
"test-source")
|
||||
((id)
|
||||
(process-load-new-guix-revision-job id)))))))))))))
|
||||
|
||||
(exec-query conn "TRUNCATE guix_revisions CASCADE")
|
||||
(exec-query conn "TRUNCATE load_new_guix_revision_jobs CASCADE")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue