mirror of
https://github.com/aljazceru/CTFd.git
synced 2025-12-17 14:04:20 +01:00
Only add SQLALCHEMY_ENGINE_OPTIONS under production databases
This commit is contained in:
@@ -246,6 +246,7 @@ class Config(object):
|
|||||||
UPDATE_CHECK = not os.getenv("UPDATE_CHECK") # Defaults True
|
UPDATE_CHECK = not os.getenv("UPDATE_CHECK") # Defaults True
|
||||||
APPLICATION_ROOT = os.getenv("APPLICATION_ROOT") or "/"
|
APPLICATION_ROOT = os.getenv("APPLICATION_ROOT") or "/"
|
||||||
SERVER_SENT_EVENTS = not os.getenv("SERVER_SENT_EVENTS") # Defaults True
|
SERVER_SENT_EVENTS = not os.getenv("SERVER_SENT_EVENTS") # Defaults True
|
||||||
|
if DATABASE_URL.startswith("sqlite") is False:
|
||||||
SQLALCHEMY_ENGINE_OPTIONS = {
|
SQLALCHEMY_ENGINE_OPTIONS = {
|
||||||
"max_overflow": int(os.getenv("SQLALCHEMY_MAX_OVERFLOW", 20))
|
"max_overflow": int(os.getenv("SQLALCHEMY_MAX_OVERFLOW", 20))
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user