url-abuse/worker.py

20 lines
362 B
Python
Raw Normal View History

2015-03-02 14:55:34 +01:00
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import os
import redis
from rq import Worker, Queue, Connection
listen = ['default']
redis_url = os.getenv('REDISTOGO_URL', 'redis://localhost:6334')
conn = redis.from_url(redis_url)
if __name__ == '__main__':
with Connection(conn):
2015-05-03 23:28:08 +02:00
worker = Worker(list(map(Queue, listen)))
2015-03-02 14:55:34 +01:00
worker.work()