Skip to content

Commit

Permalink
SQLALCHEMY_ECHO moved to env. variables (DEBUG_SQL)
Browse files Browse the repository at this point in the history
  • Loading branch information
Jan Polonsky committed Jan 24, 2023
1 parent 9870da0 commit 7cc9bde
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions docker/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ services:

TZ: "${TZ}"
DEBUG: "true"
DEBUG_SQL: "false"
# to allow automatic initialisation of collectors/presenters/publishers
COLLECTOR_PRESENTER_PUBLISHER_API_KEY: "${COLLECTOR_PRESENTER_PUBLISHER_API_KEY}"
labels:
Expand Down
2 changes: 1 addition & 1 deletion src/core/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ class Config(object):
SQLALCHEMY_DATABASE_URI = 'postgresql+psycopg2://{user}:{pw}@{url}/{db}'.format(user=DB_USER, pw=DB_PASSWORD,
url=DB_URL, db=DB_DATABASE)
SQLALCHEMY_TRACK_MODIFICATIONS = False
#SQLALCHEMY_ECHO = True # DEBUG SQL Queries
SQLALCHEMY_ECHO = (os.getenv("DEBUG_SQL", "false").lower() == "true") # DEBUG SQL Queries

if "DB_POOL_SIZE" in os.environ:
DB_POOL_SIZE = os.getenv("DB_POOL_SIZE")
Expand Down

0 comments on commit 7cc9bde

Please sign in to comment.