def __init__(self, name='huey', store_none=False, always_eager=False, **conn_kwargs): queue = RedisBlockingQueue(name, **conn_kwargs) result_store = RedisDataStore(name, **conn_kwargs) schedule = RedisSchedule(name, **conn_kwargs) events = RedisEventEmitter(name, **conn_kwargs) super(RedisHuey, self).__init__( queue=queue, result_store=result_store, schedule=schedule, events=events, store_none=store_none, always_eager=always_eager)
from huey.backends.redis_backend import RedisBlockingQueue, RedisDataStore from huey.bin.config import BaseConfiguration from huey.queue import Invoker queue = RedisBlockingQueue('test-queue', host='localhost', port=6379) result_store = RedisDataStore('results', host='localhost', port=6379) invoker = Invoker(queue, result_store=result_store) class Configuration(BaseConfiguration): QUEUE = queue RESULT_STORE = result_store PERIODIC = True