use correct watch folder

Signed-off-by: Marc 'risson' Schmitt <marc.schmitt@risson.space>
This commit is contained in:
Marc 'risson' Schmitt
2025-06-24 18:32:08 +02:00
parent e4bd05f444
commit f99cb3e9fb
3 changed files with 3 additions and 1 deletions

View File

@ -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",

View File

@ -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,

View File

@ -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")