|
|
@ -4,7 +4,7 @@ import argparse
|
|
|
|
import logbook
|
|
|
|
import logbook
|
|
|
|
import redis
|
|
|
|
import redis
|
|
|
|
from logbook import handlers
|
|
|
|
from logbook import handlers
|
|
|
|
from rq import use_redis, Queue, Worker
|
|
|
|
from rq import use_connection, Queue, Worker
|
|
|
|
from redis.exceptions import ConnectionError
|
|
|
|
from redis.exceptions import ConnectionError
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -64,7 +64,7 @@ def main():
|
|
|
|
|
|
|
|
|
|
|
|
# Setup connection to Redis
|
|
|
|
# Setup connection to Redis
|
|
|
|
redis_conn = redis.Redis(host=args.host, port=args.port, db=args.db)
|
|
|
|
redis_conn = redis.Redis(host=args.host, port=args.port, db=args.db)
|
|
|
|
use_redis(redis_conn)
|
|
|
|
use_connection(redis_conn)
|
|
|
|
try:
|
|
|
|
try:
|
|
|
|
queues = map(Queue, args.queues)
|
|
|
|
queues = map(Queue, args.queues)
|
|
|
|
w = Worker(queues, name=args.name)
|
|
|
|
w = Worker(queues, name=args.name)
|
|
|
|