aboutsummaryrefslogtreecommitdiff
path: root/scripts/guix-data-service-process-branch-updated-email.in
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/guix-data-service-process-branch-updated-email.in')
-rw-r--r--scripts/guix-data-service-process-branch-updated-email.in12
1 files changed, 7 insertions, 5 deletions
diff --git a/scripts/guix-data-service-process-branch-updated-email.in b/scripts/guix-data-service-process-branch-updated-email.in
index de87dcc..58fb772 100644
--- a/scripts/guix-data-service-process-branch-updated-email.in
+++ b/scripts/guix-data-service-process-branch-updated-email.in
@@ -25,10 +25,12 @@
(ice-9 textual-ports)
(squee)
(email email)
+ (guix-data-service database)
(guix-data-service branch-updated-emails))
-(let ((conn (connect-to-postgres-paramstring "dbname=guix_data_service")))
- (enqueue-job-for-email
- conn
- (parse-email
- (get-string-all (current-input-port)))))
+(with-postgresql-connection
+ (lambda (conn)
+ (enqueue-job-for-email
+ conn
+ (parse-email
+ (get-string-all (current-input-port))))))