mirror of
git://git.savannah.gnu.org/guix/guix-cuirass.git
synced 2023-12-14 06:03:04 +01:00
Use default database parameters.
* src/cuirass/parameters.scm (%cuirass-database, %cuirass-host): New parameters. * src/cuirass/database.scm (db-open): Use them.
This commit is contained in:
parent
37de70546b
commit
370ff7d8cd
|
@ -25,6 +25,7 @@
|
|||
#:use-module (cuirass logging)
|
||||
#:use-module (cuirass config)
|
||||
#:use-module (cuirass notification)
|
||||
#:use-module (cuirass parameters)
|
||||
#:use-module (cuirass remote)
|
||||
#:use-module (cuirass specification)
|
||||
#:use-module (cuirass utils)
|
||||
|
@ -356,8 +357,8 @@ upgrade-n.sql files."
|
|||
database object."
|
||||
(let* ((param (or database
|
||||
(format #f "dbname=~a host=~a"
|
||||
(getenv "CUIRASS_DATABASE")
|
||||
(getenv "CUIRASS_HOST"))))
|
||||
(%cuirass-database)
|
||||
(%cuirass-host))))
|
||||
(db (connect-to-postgres-paramstring param)))
|
||||
(when (%create-database?)
|
||||
(match (db-schema-version db)
|
||||
|
|
|
@ -17,10 +17,14 @@
|
|||
;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
(define-module (cuirass parameters)
|
||||
#:export (%cuirass-url
|
||||
#:export (%cuirass-database
|
||||
%cuirass-host
|
||||
%cuirass-url
|
||||
|
||||
%zabbix-url
|
||||
%zabbix-user
|
||||
%zabbix-password
|
||||
|
||||
%mastodon-instance-name
|
||||
%mastodon-instance-url
|
||||
%mastodon-instance-token))
|
||||
|
@ -28,6 +32,14 @@
|
|||
;; This variable is looked up by 'mu-message-send'.
|
||||
(define-public mu-debug 0)
|
||||
|
||||
;; The Cuirass PostgreSQL database name.
|
||||
(define %cuirass-database
|
||||
(make-parameter "cuirass"))
|
||||
|
||||
;; The Cuirass PostgreSQL database host.
|
||||
(define %cuirass-host
|
||||
(make-parameter "/var/run/postgresql"))
|
||||
|
||||
;; The URL of the Cuirass web server. This is useful to send absolute links
|
||||
;; within notifications.
|
||||
(define %cuirass-url
|
||||
|
|
Loading…
Reference in a new issue