Skip to content
This repository has been archived by the owner on Aug 11, 2022. It is now read-only.

Commit

Permalink
Add custom redis queue worker
Browse files Browse the repository at this point in the history
  • Loading branch information
ms-christensen committed Aug 25, 2019
1 parent b4ec19c commit 9a2b43c
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions worker.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
#!/usr/bin/env python
import sys

from redis import Redis
from rq import Connection, Worker

# Provide queue names to listen to as arguments to this script,
# similar to rq worker
with Connection():
qs = sys.argv[1:] or ["default"]

w = Worker(qs, connection=Redis(host="redis"))
w.work()

0 comments on commit 9a2b43c

Please sign in to comment.