PaperParser/config.py

24 lines
756 B
Python

import os
basedir = os.path.abspath(os.path.dirname(__file__))
class ProductionConfig:
SQLALCHEMY_DATABASE_URI = f"postgresql://{os.environ.get('POSTGRES_USER')}:{os.environ.get('POSTGRES_PASSWORD')}@postgres/{os.environ.get('POSTGRES_DB')}"
SQLALCHEMY_TRACK_MODIFICATIONS = False
CELERY = dict(
broker_url="redis://redis/0",
result_backend="redis://redis/0",
task_ignore_result=True,
)
class DebugConfig:
SQLALCHEMY_DATABASE_URI = f"postgresql://postgres:123456789@localhost:5432/paper"
SQLALCHEMY_TRACK_MODIFICATIONS = False
CELERY = dict(
broker_url="redis://localhost:6379/0",
result_backend="redis://localhost:6379/0",
task_ignore_result=True,
)
config = DebugConfig