From 4f747ca4e529ba9d485df3b003c35641bdb7b400 Mon Sep 17 00:00:00 2001 From: "Dustin J. Mitchell" Date: Tue, 18 May 2021 15:38:47 +0000 Subject: [PATCH] use 'postgresql://' database URL --- pulseguardian/config.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/pulseguardian/config.py b/pulseguardian/config.py index a490b5d7..ce8c3fe2 100644 --- a/pulseguardian/config.py +++ b/pulseguardian/config.py @@ -1,3 +1,4 @@ +import re import base64 import os @@ -43,6 +44,8 @@ # Database database_url = os.getenv('DATABASE_URL', 'postgresql://root@localhost/pulseguardian') +# `postgres://` is deprecated in favor of `postgresql://`, but heroku doesn't use postgresql +database_url = re.sub('^postgres:', 'postgresql:', database_url) pool_recycle_interval = int(os.getenv('POOL_RECYCLE_INTERVAL', 60)) # RabbitMQ