diff options
author | Christopher Baines <mail@cbaines.net> | 2024-04-01 21:51:29 +0100 |
---|---|---|
committer | Christopher Baines <mail@cbaines.net> | 2024-04-01 21:51:29 +0100 |
commit | b5f59189e17161b2396adf7b5440f04a2a8d5c01 (patch) | |
tree | 6ce501e452f141fc3289cd3a4bf5a70c06bc7bda /guix-data-service/web | |
parent | 5f5b8fc91dae1a8cd01c3cbee05242d0a46f123f (diff) | |
download | data-service-b5f59189e17161b2396adf7b5440f04a2a8d5c01.tar data-service-b5f59189e17161b2396adf7b5440f04a2a8d5c01.tar.gz |
Move backfilling in to the server module and use the connection pool
To avoid using the old PostgreSQL connection per thread code.
Diffstat (limited to 'guix-data-service/web')
-rw-r--r-- | guix-data-service/web/server.scm | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/guix-data-service/web/server.scm b/guix-data-service/web/server.scm index 1c0bce1..b73b186 100644 --- a/guix-data-service/web/server.scm +++ b/guix-data-service/web/server.scm @@ -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))) |