Move backfilling in to the server module and use the connection pool
To avoid using the old PostgreSQL connection per thread code.
This commit is contained in:
parent
5f5b8fc91d
commit
b5f59189e1
3 changed files with 19 additions and 24 deletions
|
|
@ -35,6 +35,7 @@
|
|||
#:use-module (guix-data-service database)
|
||||
#:use-module (guix-data-service web controller)
|
||||
#:use-module (guix-data-service web util)
|
||||
#:use-module (guix-data-service model guix-revision-package-derivation)
|
||||
#:export (%guix-data-service-metrics-registry
|
||||
|
||||
start-guix-data-service-web-server))
|
||||
|
|
@ -120,6 +121,12 @@
|
|||
|
||||
(resource-pool-default-timeout 5))
|
||||
|
||||
(spawn-fiber
|
||||
(lambda ()
|
||||
(with-resource-from-pool (connection-pool) conn
|
||||
(backfill-guix-revision-package-derivation-distribution-counts
|
||||
conn))))
|
||||
|
||||
(let ((render-metrics
|
||||
(make-render-metrics registry)))
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue