rq/examples/run_worker.py

11 lines
197 B
Python
Raw Normal View History

2011-11-15 21:45:51 +00:00
from rq import Queue, Worker
2011-11-14 14:15:05 +00:00
# Tell rq what Redis connection to use
2011-11-15 21:45:51 +00:00
from redis import Redis
from rq import conn
conn.push(Redis())
2011-11-14 14:15:05 +00:00
2011-11-15 21:45:51 +00:00
if __name__ == '__main__':
q = Queue()
Worker(q).work()