do not use RESET_DB to avoid potential error: uncomment fake_date locally if necessary
This commit is contained in:
parent
a5615b22e7
commit
6e387444f5
|
@ -50,7 +50,6 @@ EMAIL_SERVERS_WITH_PRIORITY = eval(
|
||||||
EMAIL_SERVERS = [es for _, es in EMAIL_SERVERS_WITH_PRIORITY]
|
EMAIL_SERVERS = [es for _, es in EMAIL_SERVERS_WITH_PRIORITY]
|
||||||
|
|
||||||
# Database
|
# Database
|
||||||
RESET_DB = "RESET_DB" in os.environ
|
|
||||||
DB_URI = os.environ["DB_URI"]
|
DB_URI = os.environ["DB_URI"]
|
||||||
|
|
||||||
# Flask secret
|
# Flask secret
|
||||||
|
|
|
@ -19,7 +19,6 @@ from app.config import (
|
||||||
ENABLE_SENTRY,
|
ENABLE_SENTRY,
|
||||||
URL,
|
URL,
|
||||||
SHA1,
|
SHA1,
|
||||||
RESET_DB,
|
|
||||||
PADDLE_MONTHLY_PRODUCT_ID,
|
PADDLE_MONTHLY_PRODUCT_ID,
|
||||||
)
|
)
|
||||||
from app.dashboard.base import dashboard_bp
|
from app.dashboard.base import dashboard_bp
|
||||||
|
@ -379,10 +378,10 @@ if __name__ == "__main__":
|
||||||
# enable to print all queries generated by sqlalchemy
|
# enable to print all queries generated by sqlalchemy
|
||||||
# app.config["SQLALCHEMY_ECHO"] = True
|
# app.config["SQLALCHEMY_ECHO"] = True
|
||||||
|
|
||||||
if RESET_DB:
|
# warning: only used in local
|
||||||
LOG.d("reset db, add fake data")
|
# LOG.d("reset db, add fake data")
|
||||||
with app.app_context():
|
# with app.app_context():
|
||||||
fake_data()
|
# fake_data()
|
||||||
|
|
||||||
if URL.startswith("https"):
|
if URL.startswith("https"):
|
||||||
LOG.d("enable https")
|
LOG.d("enable https")
|
||||||
|
|
Loading…
Reference in a new issue