Skip to content
Snippets Groups Projects
Commit cb272aa8 authored by Simon Künzel's avatar Simon Künzel
Browse files

Make live config update interval configurable

parent d44bdd57
No related branches found
No related tags found
No related merge requests found
...@@ -98,6 +98,8 @@ DEFAULT_CACHE_CONTROL_MAX_AGE_SECONDS = 5 * 60 ...@@ -98,6 +98,8 @@ DEFAULT_CACHE_CONTROL_MAX_AGE_SECONDS = 5 * 60
API_DIAGNOSTICS_HISTORY_SIZE_MINUTES = 7 * 24 * 60 API_DIAGNOSTICS_HISTORY_SIZE_MINUTES = 7 * 24 * 60
API_DIAGNOSTICS_INTERVAL_SIZE_MINUTES = 30 API_DIAGNOSTICS_INTERVAL_SIZE_MINUTES = 30
LIVE_CONFIG_UPDATE_INTERVAL_SECONDS = 60
# LDAP_HOST = "auth.fsmpi.rwth-aachen.de" # LDAP_HOST = "auth.fsmpi.rwth-aachen.de"
LDAP_PORT = 636 LDAP_PORT = 636
LDAP_GROUPS = ["fachschaft"] LDAP_GROUPS = ["fachschaft"]
......
import os import os
from pathlib import Path from pathlib import Path
import api
from api.miscellaneous import * from api.miscellaneous import *
from api.objects.types import TYPE_STRING_LONG from api.objects.types import TYPE_STRING_LONG
...@@ -68,7 +69,7 @@ class LiveConfig: ...@@ -68,7 +69,7 @@ class LiveConfig:
config: LiveConfig = LiveConfig() config: LiveConfig = LiveConfig()
@scheduled_function(10, 1) @scheduled_function(api.config["LIVE_CONFIG_UPDATE_INTERVAL_SECONDS"], 1)
def _update_live_config(): def _update_live_config():
if _LIVE_CONFIG_PATH is None: if _LIVE_CONFIG_PATH is None:
return return
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment