2019-04-25 06:37:23 +00:00
|
|
|
SECRET_KEY = 'i-like-ogn'
|
2019-04-02 21:48:24 +00:00
|
|
|
|
2019-04-29 19:42:40 +00:00
|
|
|
SQLALCHEMY_DATABASE_URI = 'postgresql://postgres@localhost:5432/ogn'
|
2019-01-23 19:30:02 +00:00
|
|
|
SQLALCHEMY_TRACK_MODIFICATIONS = False
|
2016-01-29 01:34:12 +00:00
|
|
|
|
2019-04-02 21:48:24 +00:00
|
|
|
# Flask-Cache stuff
|
2019-04-29 19:42:40 +00:00
|
|
|
CACHE_TYPE = 'simple'
|
2019-04-02 21:48:24 +00:00
|
|
|
CACHE_DEFAULT_TIMEOUT = 300
|
|
|
|
|
2019-01-09 08:01:06 +00:00
|
|
|
# Celery stuff
|
2019-03-10 14:58:10 +00:00
|
|
|
CELERY_BROKER_URL = 'redis://localhost:6379/0'
|
|
|
|
CELERY_RESULT_BACKEND = 'redis://localhost:6379/0'
|
2016-01-29 04:33:59 +00:00
|
|
|
|
2019-04-02 21:48:24 +00:00
|
|
|
|
2019-03-23 23:00:59 +00:00
|
|
|
from celery.schedules import crontab
|
2016-01-29 04:33:59 +00:00
|
|
|
from datetime import timedelta
|
|
|
|
|
2019-03-10 18:57:44 +00:00
|
|
|
CELERYBEAT_SCHEDULE = {
|
2016-02-04 21:52:37 +00:00
|
|
|
'update-ddb': {
|
2019-03-10 18:57:44 +00:00
|
|
|
'task': 'import_ddb',
|
2019-03-18 07:37:19 +00:00
|
|
|
'schedule': timedelta(hours=1),
|
2016-02-04 21:52:37 +00:00
|
|
|
},
|
2017-12-17 13:34:14 +00:00
|
|
|
'update-country-codes': {
|
2019-03-10 18:57:44 +00:00
|
|
|
'task': 'update_receivers_country_code',
|
2019-04-25 06:37:23 +00:00
|
|
|
'schedule': timedelta(days=1),
|
2017-12-17 13:34:14 +00:00
|
|
|
},
|
2016-06-29 21:26:30 +00:00
|
|
|
'update-takeoff-and-landing': {
|
2019-03-10 18:57:44 +00:00
|
|
|
'task': 'update_takeoff_landings',
|
2019-04-25 06:37:23 +00:00
|
|
|
'schedule': timedelta(hours=1),
|
|
|
|
'kwargs': {'last_minutes': 90},
|
2016-04-28 18:36:56 +00:00
|
|
|
},
|
2016-06-29 21:26:30 +00:00
|
|
|
'update-logbook': {
|
2019-03-10 18:57:44 +00:00
|
|
|
'task': 'update_logbook_entries',
|
2019-04-25 06:37:23 +00:00
|
|
|
'schedule': timedelta(hours=2),
|
2019-04-30 05:18:47 +00:00
|
|
|
'kwargs': {'day_offset': 0},
|
2016-06-29 21:26:30 +00:00
|
|
|
},
|
2017-12-17 13:34:14 +00:00
|
|
|
'update-max-altitudes': {
|
2019-03-10 18:57:44 +00:00
|
|
|
'task': 'update_logbook_max_altitude',
|
2019-04-14 17:57:40 +00:00
|
|
|
'schedule': timedelta(hours=1),
|
2019-04-30 05:18:47 +00:00
|
|
|
'kwargs': {'day_offset': 0},
|
2016-01-29 04:33:59 +00:00
|
|
|
},
|
2019-03-23 23:00:59 +00:00
|
|
|
'update-stats-daily': {
|
|
|
|
'task': 'update_stats',
|
|
|
|
'schedule': crontab(hour=0, minute=5),
|
|
|
|
'kwargs': {'day_offset': -1},
|
|
|
|
},
|
2019-04-30 05:18:47 +00:00
|
|
|
'update-logbook-daily': {
|
|
|
|
'task': 'update_logbook_entries',
|
|
|
|
'schedule': crontab(hour=1, minute=0),
|
|
|
|
'kwargs': {'day_offset': -1},
|
|
|
|
},
|
2019-04-25 06:37:23 +00:00
|
|
|
'purge_old_data': {
|
|
|
|
'task': 'purge_old_data',
|
|
|
|
'schedule': timedelta(hours=1),
|
|
|
|
'kwargs': {'max_hours': 48}
|
|
|
|
},
|
2016-01-29 04:33:59 +00:00
|
|
|
}
|