use-ssl isn't a boolean, it expects a symbol

This commit is contained in:
niten 2022-02-01 10:28:48 -08:00
parent 02a5db8875
commit 8847d37724
1 changed files with 4 additions and 6 deletions

View File

@ -159,7 +159,9 @@
(let ((postmodern:*ignore-unknown-columns* t)
(cl-postgres:*query-log* *standard-output*)
(*dns-store* (make-instance 'backplane-dns-store:postgres-dns-store)))
(postmodern:with-connection (list db-name db-username db-password db-host :port db-port :use-ssl db-use-ssl)
(postmodern:with-connection (list db-name db-username db-password db-host
:port db-port
:use-ssl (symbolize db-use-ssl))
(with-backplane (backplane (backplane-connect xmpp-host xmpp-username xmpp-password))
(start-listening backplane)))))
@ -177,10 +179,6 @@
(uiop:die 1 "unable to find required env var: ~A" env-var))
value)))
(defun getenv-flag (env-var)
(let ((value (uiop:getenv env-var)))
(if value t nil)))
(defun start-listener-with-env ()
(backplane-dns-listen
:xmpp-host (getenv-or-fail "FUDO_DNS_BACKPLANE_XMPP_HOSTNAME")
@ -192,4 +190,4 @@
:db-host (getenv-or-fail "FUDO_DNS_BACKPLANE_DATABASE_HOSTNAME")
:db-port (getenv-or-fail "FUDO_DNS_BACKPLANE_DATABASE_PORT" 5432)
:db-password (read-file-line (getenv-or-fail "FUDO_DNS_BACKPLANE_DATABASE_PASSWORD_FILE"))
:db-use-ssl (getenv-flag "FUDO_DNS_BACKPLANE_DATABASE_USE_SSL")))
:db-use-ssl (getenv-or-fail "FUDO_DNS_BACKPLANE_DATABASE_USE_SSL" "no")))