From 515ce94a856ad3dc43f1c96d0384a9bb590695d4 Mon Sep 17 00:00:00 2001 From: Jens L Date: Tue, 12 Sep 2023 13:26:23 +0200 Subject: [PATCH] root: add option to disable beat when running worker (#6849) Signed-off-by: Jens Langhammer --- authentik/core/management/commands/worker.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/authentik/core/management/commands/worker.py b/authentik/core/management/commands/worker.py index d65027943..e400e83ab 100644 --- a/authentik/core/management/commands/worker.py +++ b/authentik/core/management/commands/worker.py @@ -16,6 +16,9 @@ LOGGER = get_logger() class Command(BaseCommand): """Run worker""" + def add_arguments(self, parser): + parser.add_argument("-b", "--beat", action="store_true") + def handle(self, **options): close_old_connections() if CONFIG.get_bool("remote_debug"): @@ -28,7 +31,7 @@ class Command(BaseCommand): optimization="fair", autoscale=(3, 1), task_events=True, - beat=True, + beat=options.get("beat", True), schedule_filename=f"{tempdir}/celerybeat-schedule", queues=["authentik", "authentik_scheduled", "authentik_events"], )