From 734a6d5b325c3765e01f61b1e9a0f4813d11b30b Mon Sep 17 00:00:00 2001 From: Jeroen Boonstra Date: Fri, 8 Jun 2018 11:46:17 +0200 Subject: [PATCH] Enable bg updates --- app/views.py | 7 ++++++- config_template.py | 3 +++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/app/views.py b/app/views.py index 9fae83f..1e15aec 100644 --- a/app/views.py +++ b/app/views.py @@ -459,7 +459,12 @@ def saml_logout(): @app.route('/dashboard', methods=['GET', 'POST']) @login_required def dashboard(): - d = Domain().update() + if not app.config.get('BG_DOMAIN_UPDATES'): + logging.debug('Update domains in foreground') + d = Domain().update() + else: + logging.debug('Update domains in background') + # stats for dashboard domain_count = Domain.query.count() diff --git a/config_template.py b/config_template.py index a481cac..9d25fd9 100644 --- a/config_template.py +++ b/config_template.py @@ -130,3 +130,6 @@ DNSSEC_ADMINS_ONLY = False # EXPERIMENTAL FEATURES PRETTY_IPV6_PTR = False + +# Domain updates in background, for big installations +BG_DOMAIN_UPDATES = False