diff --git a/README.md b/README.md index 22e8cba..309f4e7 100644 --- a/README.md +++ b/README.md @@ -34,12 +34,12 @@ For best performance you should use [TimescaleDB](https://www.timescale.com), wh apt-get install redis-server ``` -5. Set the configuration +5. Set the configuration. Let the environment variable `OGN_CONFIG_MODULE` point to the configuration file: -``` -export OGN_CONFIG_MODULE="config/default.py" -``` + ``` + export OGN_CONFIG_MODULE="config/default.py" + ``` 6. Create database diff --git a/ogn_python/config/default.py b/ogn_python/config/default.py index 15566b9..503fd1e 100644 --- a/ogn_python/config/default.py +++ b/ogn_python/config/default.py @@ -32,16 +32,23 @@ CELERYBEAT_SCHEDULE = { 'update-logbook': { 'task': 'update_logbook_entries', 'schedule': timedelta(hours=2), + 'kwargs': {'day_offset': 0}, }, 'update-max-altitudes': { 'task': 'update_logbook_max_altitude', 'schedule': timedelta(hours=1), + 'kwargs': {'day_offset': 0}, }, 'update-stats-daily': { 'task': 'update_stats', 'schedule': crontab(hour=0, minute=5), 'kwargs': {'day_offset': -1}, }, + 'update-logbook-daily': { + 'task': 'update_logbook_entries', + 'schedule': crontab(hour=1, minute=0), + 'kwargs': {'day_offset': -1}, + }, 'purge_old_data': { 'task': 'purge_old_data', 'schedule': timedelta(hours=1),