From 7e7b33dba7089f3a25c28e8421f1a1ec518a22ab Mon Sep 17 00:00:00 2001 From: Marc 'risson' Schmitt Date: Fri, 20 Jun 2025 19:30:46 +0200 Subject: [PATCH] run scheduler more often: TODO: move it back into the broker Signed-off-by: Marc 'risson' Schmitt --- authentik/lib/default.yml | 1 + authentik/root/settings.py | 3 +++ scripts/generate_config.py | 1 + 3 files changed, 5 insertions(+) diff --git a/authentik/lib/default.yml b/authentik/lib/default.yml index 1c550e80bf..dd50a080cc 100644 --- a/authentik/lib/default.yml +++ b/authentik/lib/default.yml @@ -162,6 +162,7 @@ worker: consumer_listen_timeout: "seconds=30" task_purge_interval: "days=1" task_expiration: "days=30" + scheduler_interval: "seconds=60" storage: media: diff --git a/authentik/root/settings.py b/authentik/root/settings.py index 90ec641d78..18daa60fe5 100644 --- a/authentik/root/settings.py +++ b/authentik/root/settings.py @@ -376,6 +376,9 @@ DRAMATIQ = { }, "scheduler_class": "authentik.tasks.schedules.scheduler.Scheduler", "schedule_model": "authentik.tasks.schedules.models.Schedule", + "scheduler_interval": timedelta_from_string( + CONFIG.get("worker.scheduler_interval") + ).total_seconds(), "middlewares": ( ("django_dramatiq_postgres.middleware.SchedulerMiddleware", {}), ("django_dramatiq_postgres.middleware.FullyQualifiedActorName", {}), diff --git a/scripts/generate_config.py b/scripts/generate_config.py index 18c8edf350..6172dec9c6 100755 --- a/scripts/generate_config.py +++ b/scripts/generate_config.py @@ -50,6 +50,7 @@ def generate_local_config(): "processes": 1, "threads": 1, "consumer_listen_timeout": "seconds=10", + "scheduler_interval": "seconds=30", }, }