diff --git a/authentik/root/settings.py b/authentik/root/settings.py index 62b7e5087b..efc1018607 100644 --- a/authentik/root/settings.py +++ b/authentik/root/settings.py @@ -373,6 +373,7 @@ DRAMATIQ = { "consumer_listen_timeout": timedelta_from_string( CONFIG.get("worker.consumer_listen_timeout") ).total_seconds(), + "watch_folder": BASE_DIR / "authentik", }, "scheduler_class": "authentik.tasks.schedules.scheduler.Scheduler", "schedule_model": "authentik.tasks.schedules.models.Schedule", diff --git a/packages/django-dramatiq-postgres/django_dramatiq_postgres/conf.py b/packages/django-dramatiq-postgres/django_dramatiq_postgres/conf.py index e6bb2239cd..fab7b098bb 100644 --- a/packages/django-dramatiq-postgres/django_dramatiq_postgres/conf.py +++ b/packages/django-dramatiq-postgres/django_dramatiq_postgres/conf.py @@ -99,6 +99,7 @@ class Conf: def worker(self) -> dict[str, Any]: return { "use_gevent": False, + "watch_folder": ".", "watch_use_polling": False, "processes": None, "threads": None, diff --git a/packages/django-dramatiq-postgres/django_dramatiq_postgres/management/commands/worker.py b/packages/django-dramatiq-postgres/django_dramatiq_postgres/management/commands/worker.py index 68f526bafb..f0b88bf1b1 100644 --- a/packages/django-dramatiq-postgres/django_dramatiq_postgres/management/commands/worker.py +++ b/packages/django-dramatiq-postgres/django_dramatiq_postgres/management/commands/worker.py @@ -37,7 +37,7 @@ class Command(BaseCommand): worker = Conf().worker executable_name = "dramatiq-gevent" if worker["use_gevent"] else "dramatiq" executable_path = self._resolve_executable(executable_name) - watch_args = ["--watch", "."] if watch else [] + watch_args = ["--watch", worker["watch_folder"]] if watch else [] if watch_args and worker["watch_use_polling"]: watch_args.append("--watch-use-polling")