Fix RQ worker invocation

This commit is contained in:
2026-07-28 00:01:31 +03:30
parent 983b5279a2
commit 3f180e88ed
2 changed files with 3 additions and 2 deletions
+2 -1
View File
@@ -30,8 +30,9 @@ def on_startup() -> None:
if os.environ.get("SKIP_INTERNAL_WORKER", "").lower() in ("1", "true", "yes"):
return
redis_url = os.environ.get("REDIS_URL", "redis://localhost:6379/0")
rq_executable = str(Path(sys.executable).with_name("rq"))
_rq_worker = subprocess.Popen(
[sys.executable, "-m", "rq", "worker", "--url", redis_url, "batch"],
[rq_executable, "worker", "--url", redis_url, "batch"],
stdout=subprocess.DEVNULL,
stderr=subprocess.DEVNULL,
)