added docker and docker compose
This commit is contained in:
@@ -27,6 +27,8 @@ _rq_worker: subprocess.Popen[bytes] | None = None
|
||||
def on_startup() -> None:
|
||||
global _rq_worker
|
||||
init_db()
|
||||
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_worker = subprocess.Popen(
|
||||
[sys.executable, "-m", "rq", "worker", "--url", redis_url, "batch"],
|
||||
|
||||
Reference in New Issue
Block a user