# Path: feedhq/utils.py
# def get_redis_connection():
#     """
#     Helper used for obtain a raw redis client.
#     """
#     from redis_cache.cache import pool
#     client = redis.Redis(**settings.REDIS)
#     client.connection_pool = pool.get_connection_pool(
#         client,
#         parser_class=redis.connection.HiredisParser,
#         connection_pool_class=redis.ConnectionPool,
#         connection_pool_class_kwargs={},
#         **settings.REDIS)
#     return client


import rq
from django.conf import settings
from .utils import get_redis_connection
"""
Generic helpers for RQ task execution
"""
from __future__ import absolute_import





def enqueue(function, args=None, kwargs=None, timeout=None, queue='default'):
    async = not settings.RQ_EAGER

    if args is None:
        args = ()
    if kwargs is None:
        kwargs = {}


# Path: feedhq/utils.py
# def get_redis_connection():
#     """
#     Helper used for obtain a raw redis client.
#     """
#     from redis_cache.cache import pool
#     client = redis.Redis(**settings.REDIS)
#     client.connection_pool = pool.get_connection_pool(
#         client,
#         parser_class=redis.connection.HiredisParser,
#         connection_pool_class=redis.ConnectionPool,
#         connection_pool_class_kwargs={},
#         **settings.REDIS)
#     return client


# Path: feedhq/tasks.py
import rq
from django.conf import settings
from .utils import get_redis_connection

"""
Generic helpers for RQ task execution
"""
from __future__ import absolute_import





def enqueue(function, args=None, kwargs=None, timeout=None, queue='default'):
    async = not settings.RQ_EAGER

    if args is None:
        args = ()
    if kwargs is None:
        kwargs = {}


    conn = get_redis_connection()