Add helper function for returning a Redis client

(imported from commit 47f87d388d24343ac6b631181a55287eb8cd4a6d)
This commit is contained in:
Zev Benjamin
2014-02-04 18:35:32 -05:00
committed by Tim Abbott
parent 6ea795915e
commit 6691789cce
5 changed files with 16 additions and 7 deletions

View File

@@ -0,0 +1,8 @@
from __future__ import absolute_import
from django.conf import settings
import redis
def get_redis_client():
return redis.StrictRedis(host=settings.REDIS_HOST, port=settings.REDIS_PORT, db=0)