mirror of
https://framagit.org/framasoft/framaspace/argos.git
synced 2025-04-28 18:02:41 +02:00
Issue a warning when using a temporary db.
This commit is contained in:
parent
fa45338914
commit
dd2dc14351
1 changed files with 3 additions and 0 deletions
|
@ -68,6 +68,9 @@ def read_config(app, settings):
|
|||
|
||||
def setup_database(app, settings):
|
||||
# For sqlite, we need to add connect_args={"check_same_thread": False}
|
||||
logger.debug(f"Using database URL {settings.database_url}")
|
||||
if settings.database_url.startswith("sqlite:////tmp"):
|
||||
logger.warning("Using sqlite in /tmp is not recommended for production")
|
||||
engine = create_engine(
|
||||
settings.database_url,
|
||||
)
|
||||
|
|
Loading…
Reference in a new issue