From 387c1e375de719b2f0bf8b277dd1d6872463d79b Mon Sep 17 00:00:00 2001 From: "R. Miles McCain" Date: Thu, 21 May 2020 20:59:58 -0400 Subject: [PATCH] Add database connection timeout --- shynet/shynet/settings.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/shynet/shynet/settings.py b/shynet/shynet/settings.py index 29c2368..516fc61 100644 --- a/shynet/shynet/settings.py +++ b/shynet/shynet/settings.py @@ -105,6 +105,9 @@ else: "PASSWORD": os.environ.get("DB_PASSWORD"), "HOST": os.environ.get("DB_HOST"), "PORT": os.environ.get("DB_PORT"), + "OPTIONS": { + "connect_timeout": 5 + } } }