forked from ShorensteinCenter/Benchmarks-Program
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconfig.py
31 lines (30 loc) · 1.3 KB
/
config.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
import os
from celery.schedules import crontab
class Config():
SECRET_KEY = os.environ.get('SECRET_KEY')
CELERY_BROKER_URI = (os.environ.get('CELERY_BROKER_URI') or
'amqp://guest:guest@localhost:5672/')
TASK_SERIALIZER = 'json'
CELERYBEAT_SCHEDULE = {
'update_stored_data': {
'task': 'app.tasks.update_stored_data',
'schedule': crontab(minute='0', hour='0', day_of_month='*'),
'args': ()
},
'send_monthly_reports': {
'task': 'app.tasks.send_monthly_reports',
'schedule': crontab(minute='0', hour='0', day_of_month='1'),
'args': ()
}
}
SQLALCHEMY_DATABASE_URI = (
os.environ.get('SQLALCHEMY_DATABASE_URI') or
('sqlite:///' + os.path.join(
os.path.abspath(os.path.dirname(__file__)), 'app.db')))
SQLALCHEMY_TRACK_MODIFICATIONS = False
SERVER_NAME = os.environ.get('SERVER_NAME') or '127.0.0.1:5000'
AWS_ACCESS_KEY_ID = os.environ.get('AWS_ACCESS_KEY_ID')
AWS_SECRET_ACCESS_KEY = os.environ.get('AWS_SECRET_ACCESS_KEY')
SES_REGION_NAME = os.environ.get('SES_REGION_NAME') or 'us-west-2'
SES_DEFAULT_EMAIL_SOURCE = os.environ.get('SES_DEFAULT_EMAIL_SOURCE')
NO_EMAIL = os.environ.get('NO_EMAIL')