25 lines
630 B
Python
25 lines
630 B
Python
import os
|
|
|
|
|
|
def parse_default_while_not_defined():
|
|
envvar = os.environ.get("DEFAULT_WHILE_NOT_DEFINED")
|
|
|
|
if not envvar:
|
|
return None, None
|
|
|
|
return envvar.split(';', 1)[:2]
|
|
|
|
|
|
class Config:
|
|
SECRET_KEY = os.environ.get('SECRET_KEY', os.urandom(12))
|
|
|
|
SENTRY_DSN = os.environ.get("SENTRY_DSN")
|
|
RELEASE_ID = os.environ.get("RELEASE_ID", "test")
|
|
RELEASEMODE = os.environ.get("RELEASEMODE", "dev")
|
|
|
|
REDIS_URL = os.environ.get("REDIS_URL", "redis://localhost:6379/0")
|
|
|
|
DEFAULT_WHILE_NOT_DEFINED = parse_default_while_not_defined()
|
|
|
|
DEVICE_TIMEOUT = int(os.environ.get("DEVICE_TIMEOUT", 120))
|