From 5e2d647a6c781532d53c0fba0e31644c2cd9ed10 Mon Sep 17 00:00:00 2001 From: Jens Langhammer Date: Thu, 9 Jun 2022 20:21:31 +0200 Subject: [PATCH] core: trigger bootstrap tasks in server if we're debugging closes #3040 Signed-off-by: Jens Langhammer --- authentik/core/apps.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/authentik/core/apps.py b/authentik/core/apps.py index fe5660cca..155cd0e46 100644 --- a/authentik/core/apps.py +++ b/authentik/core/apps.py @@ -2,6 +2,7 @@ from importlib import import_module from django.apps import AppConfig +from django.conf import settings class AuthentikCoreConfig(AppConfig): @@ -15,3 +16,7 @@ class AuthentikCoreConfig(AppConfig): def ready(self): import_module("authentik.core.signals") import_module("authentik.core.managed") + if settings.DEBUG: + from authentik.root.celery import worker_ready_hook + + worker_ready_hook()