aboutsummaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorChristopher Baines <mail@cbaines.net>2019-07-12 19:45:41 +0100
committerChristopher Baines <mail@cbaines.net>2019-07-12 19:49:26 +0100
commit743cec7cb675dc6cc792a01daf898c011fc20fc7 (patch)
tree2040ed787544470a2525307e2f7479d3f29e5a90 /scripts
parent1b5db7adac298e4f0d7e6c9024fc31ebabb4a994 (diff)
downloaddata-service-743cec7cb675dc6cc792a01daf898c011fc20fc7.tar
data-service-743cec7cb675dc6cc792a01daf898c011fc20fc7.tar.gz
Associate a name with database connections
This helps when working out which connection to the database is doing what.
Diffstat (limited to 'scripts')
-rw-r--r--scripts/guix-data-service-process-branch-updated-email.in1
-rw-r--r--scripts/guix-data-service-process-jobs.in1
-rw-r--r--scripts/guix-data-service-query-build-servers.in3
3 files changed, 4 insertions, 1 deletions
diff --git a/scripts/guix-data-service-process-branch-updated-email.in b/scripts/guix-data-service-process-branch-updated-email.in
index 58fb772..6170a32 100644
--- a/scripts/guix-data-service-process-branch-updated-email.in
+++ b/scripts/guix-data-service-process-branch-updated-email.in
@@ -29,6 +29,7 @@
(guix-data-service branch-updated-emails))
(with-postgresql-connection
+ "process-branch-updated-email"
(lambda (conn)
(enqueue-job-for-email
conn
diff --git a/scripts/guix-data-service-process-jobs.in b/scripts/guix-data-service-process-jobs.in
index e4347e4..51b01bd 100644
--- a/scripts/guix-data-service-process-jobs.in
+++ b/scripts/guix-data-service-process-jobs.in
@@ -31,6 +31,7 @@
(setvbuf (current-error-port) 'line)
(with-postgresql-connection
+ "process-jobs"
(lambda (conn)
(simple-format #t "Ready to process jobs...\n")
(process-jobs conn)))
diff --git a/scripts/guix-data-service-query-build-servers.in b/scripts/guix-data-service-query-build-servers.in
index 2451fbf..b0b3cd0 100644
--- a/scripts/guix-data-service-query-build-servers.in
+++ b/scripts/guix-data-service-query-build-servers.in
@@ -25,4 +25,5 @@
(squee)
(guix-data-service builds))
-(with-postgresql-connection query-build-servers)
+(with-postgresql-connection "query-build-servers"
+ query-build-servers)