Use the config options when creating the default paramstring
This commit is contained in:
parent
04bc3af53a
commit
8e9f1af89b
1 changed files with 5 additions and 1 deletions
|
|
@ -19,6 +19,7 @@
|
|||
#:use-module (system foreign)
|
||||
#:use-module (ice-9 match)
|
||||
#:use-module (squee)
|
||||
#:use-module (guix-data-service config)
|
||||
#:export (with-postgresql-connection
|
||||
with-postgresql-transaction
|
||||
|
||||
|
|
@ -37,7 +38,10 @@
|
|||
(define paramstring
|
||||
(string-append
|
||||
(or (getenv "GUIX_DATA_SERVICE_DATABASE_PARAMSTRING")
|
||||
"dbname=guix_data_service user=guix_data_service")
|
||||
(simple-format
|
||||
#f "dbname=~A user=~A"
|
||||
(%config 'database-name)
|
||||
(%config 'database-user)))
|
||||
" application_name='guix-data-service " name "'"))
|
||||
|
||||
(let* ((conn (connect-to-postgres-paramstring
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue