diff --git a/apps/msg/utils.py b/apps/msg/utils.py index afea8f8..91e0db7 100644 --- a/apps/msg/utils.py +++ b/apps/msg/utils.py @@ -2,7 +2,7 @@ import json import logging import os -from redis import Redis +from django_redis import get_redis_connection from django.conf import settings from threading import Thread @@ -13,7 +13,7 @@ logger = logging.getLogger('apps') class JQRMSGPubSubUtils: - rc = Redis(host=settings.REDIS_HOST, port=settings.REDIS_PORT, db=0) + rc = get_redis_connection() msg_list = [] BATCH_SIZE = 100