From 6f0c73829badaf0cbc7f09adc7790bcbc81092f6 Mon Sep 17 00:00:00 2001 From: AKW <2497744746@qq.com> Date: Fri, 22 Dec 2023 17:35:17 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0corpid=E5=92=8Cuserid?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/msg/utils.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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