kopia lustrzana https://github.com/glidernet/ogn-python
Use os.environ to get SQLALCHEMY_DATABASE_URI and CELERY_BROKER_* variables
rodzic
c2de9544f1
commit
eeda6c3a01
|
@ -1,6 +1,8 @@
|
||||||
|
import os
|
||||||
|
|
||||||
SECRET_KEY = "i-like-ogn"
|
SECRET_KEY = "i-like-ogn"
|
||||||
|
|
||||||
SQLALCHEMY_DATABASE_URI = "postgresql://postgres@localhost:5432/ogn"
|
SQLALCHEMY_DATABASE_URI = os.environ.get("SQLALCHEMY_DATABASE_URI", "postgresql://postgres@localhost:5432/ogn")
|
||||||
SQLALCHEMY_TRACK_MODIFICATIONS = False
|
SQLALCHEMY_TRACK_MODIFICATIONS = False
|
||||||
|
|
||||||
# Flask-Cache stuff
|
# Flask-Cache stuff
|
||||||
|
@ -8,9 +10,8 @@ CACHE_TYPE = "simple"
|
||||||
CACHE_DEFAULT_TIMEOUT = 300
|
CACHE_DEFAULT_TIMEOUT = 300
|
||||||
|
|
||||||
# Celery stuff
|
# Celery stuff
|
||||||
CELERY_BROKER_URL = "redis://localhost:6379/0"
|
CELERY_BROKER_URL = os.environ.get("CELERY_BROKER_URL", "redis://localhost:6379/0")
|
||||||
CELERY_RESULT_BACKEND = "redis://localhost:6379/0"
|
CELERY_RESULT_BACKEND = os.environ.get("CELERY_RESULT_BACKEND", "redis://localhost:6379/0")
|
||||||
|
|
||||||
|
|
||||||
from celery.schedules import crontab
|
from celery.schedules import crontab
|
||||||
from datetime import timedelta
|
from datetime import timedelta
|
||||||
|
|
Ładowanie…
Reference in New Issue