diff --git a/nodeshot/networking/links/settings.py b/nodeshot/networking/links/settings.py old mode 100755 new mode 100644 index c57a1cfa..d7b15b1c --- a/nodeshot/networking/links/settings.py +++ b/nodeshot/networking/links/settings.py @@ -1,4 +1,5 @@ from django.conf import settings +from datetime import timedelta DEFAULT_PARSERS = [ ('netdiff.OlsrParser', 'OLSR (jsoninfo)'), @@ -9,3 +10,12 @@ ] PARSERS = DEFAULT_PARSERS + getattr(settings, 'NODESHOT_NETDIFF_PARSERS', []) + +TOPOLOGY_UPDATE_INTERVAL = getattr(settings, 'NODESHOT_TOPOLOGY_UPDATE_INTERVAL', 3) + +settings.CELERYBEAT_SCHEDULE.update({ + 'update_topology': { + 'task': 'nodeshot.networking.links.tasks.update_topology', + 'schedule': timedelta(minutes=TOPOLOGY_UPDATE_INTERVAL), + } +})