Fix RQ worker invocation
This commit is contained in:
+2
-1
@@ -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,
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user