Bugfix for multiple device infos

pull/78/head
Konstantin Gründger 2019-04-25 08:37:23 +02:00
rodzic 966fb53f3b
commit f091b308bc
3 zmienionych plików z 25 dodań i 28 usunięć

Wyświetl plik

@ -1,10 +1,10 @@
SECRET_KEY = 'you-will-never-guess'
SECRET_KEY = 'i-like-ogn'
SQLALCHEMY_DATABASE_URI = 'postgresql://postgres@localhost:5432/ogn'
SQLALCHEMY_DATABASE_URI = 'postgresql://ogn:ognwriter@localhost:5432/ogn'
SQLALCHEMY_TRACK_MODIFICATIONS = False
# Flask-Cache stuff
CACHE_TYPE = 'simple'
CACHE_TYPE = 'redis'
CACHE_DEFAULT_TIMEOUT = 300
# Celery stuff
@ -22,34 +22,29 @@ CELERYBEAT_SCHEDULE = {
},
'update-country-codes': {
'task': 'update_receivers_country_code',
'schedule': timedelta(minutes=1),
'schedule': timedelta(days=1),
},
'update-takeoff-and-landing': {
'task': 'update_takeoff_landings',
'schedule': timedelta(minutes=1),
'kwargs': {'last_minutes': 10},
'schedule': timedelta(hours=1),
'kwargs': {'last_minutes': 90},
},
'update-logbook': {
'task': 'update_logbook_entries',
'schedule': timedelta(minutes=1),
'schedule': timedelta(hours=2),
},
'update-max-altitudes': {
'task': 'update_logbook_max_altitude',
'schedule': timedelta(hours=1),
},
'update-stats-hourly': {
'task': 'update_stats',
'schedule': timedelta(hours=1),
'kwargs': {'day_offset': 0},
},
'update-stats-daily': {
'task': 'update_stats',
'schedule': crontab(hour=0, minute=5),
'kwargs': {'day_offset': -1},
},
#'purge_old_data': {
# 'task': 'purge_old_data',
# 'schedule': timedelta(minutes=10),
# 'kwargs': {'max_hours': 48}
#},
'purge_old_data': {
'task': 'purge_old_data',
'schedule': timedelta(hours=1),
'kwargs': {'max_hours': 48}
},
}

Wyświetl plik

@ -110,7 +110,7 @@ class ContinuousDbFeeder:
app.logger.error("Ignore beacon_type: {}".format(message['beacon_type']))
return
if datetime.utcnow() - self.last_flush >= timedelta(seconds=5):
if datetime.utcnow() - self.last_flush >= timedelta(seconds=20):
self.flush()
self.prepare()
@ -123,7 +123,7 @@ class ContinuousDbFeeder:
self.add_missing()
self.last_add_missing = datetime.utcnow()
if datetime.utcnow() - self.last_transfer >= timedelta(seconds=10):
if datetime.utcnow() - self.last_transfer >= timedelta(seconds=30):
self.transfer()
self.delete_beacons()
self.last_transfer = datetime.utcnow()

Wyświetl plik

@ -12,7 +12,7 @@ with open(path.join(here, 'README.md'), encoding='utf-8') as f:
setup(
name='ogn-python',
version='0.4.0',
version='0.5.0',
description='A database backend for the Open Glider Network',
long_description=long_description,
url='https://github.com/glidernet/ogn-python',
@ -34,21 +34,23 @@ setup(
install_requires=[
'Flask==1.0.2',
'flask-sqlalchemy==2.3.2',
'Flask-Migrate==2.3.1',
'Flask-Migrate==2.4.0',
'flask-bootstrap==3.3.7.1',
'flask-nav==0.6',
'flask-wtf==0.14.2',
'flask-caching==1.7.0',
'geopy==1.17.0',
'celery[redis]==4.2.1',
'aerofiles==0.4.1',
'geoalchemy2==0.5.0',
'shapely>=1.5.17,<1.6',
'geopy==1.19.0',
'celery==4.3.0',
'redis==3.2.1',
'aerofiles==1.0.0',
'geoalchemy2==0.4.0',
'shapely==1.6.4.post2',
'ogn-client==0.9.1',
'psycopg2-binary==2.7.6.1',
'psycopg2-binary==2.8.1',
'mgrs==1.3.5',
'xmlunittest==0.5.0',
'tqdm==4.28.1',
'tqdm==4.31.1',
'requests==2.21.0',
],
extras_require={
'dev': [