blueprints: use reconcile decorator instead of relying on function name prefix (#8483)

Signed-off-by: Jens Langhammer <jens@goauthentik.io>
This commit is contained in:
Jens L
2024-02-23 15:12:34 +01:00
committed by GitHub
parent 965ddcb564
commit 341d866c00
10 changed files with 52 additions and 24 deletions

View File

@ -14,14 +14,16 @@ class AuthentikCoreConfig(ManagedAppConfig):
mountpoint = ""
default = True
def reconcile_global_debug_worker_hook(self):
@ManagedAppConfig.reconcile_global
def debug_worker_hook(self):
"""Dispatch startup tasks inline when debugging"""
if settings.DEBUG:
from authentik.root.celery import worker_ready_hook
worker_ready_hook()
def reconcile_tenant_source_inbuilt(self):
@ManagedAppConfig.reconcile_tenant
def source_inbuilt(self):
"""Reconcile inbuilt source"""
from authentik.core.models import Source