Enable bg updates

This commit is contained in:
Jeroen Boonstra
2018-06-08 11:46:17 +02:00
parent 2958ae663c
commit 734a6d5b32
2 changed files with 9 additions and 1 deletions

View File

@ -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()