Created
July 2, 2017 12:28
-
-
Save codeAshu/11d1e3a981e83a0275db42bd6379900f to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import os | |
import redis | |
from rq import Worker, Queue, Connection | |
listen = ['default'] | |
redis_url = os.getenv('REDISTOGO_URL', 'redis://localhost:6379') | |
conn = redis.from_url(redis_url) | |
if __name__ == '__main__': | |
with Connection(conn): | |
worker = Worker(list(map(Queue, listen))) | |
worker.work() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment