From a23ec6d318d94b5ba2c8612b332b9cd2c992f44e Mon Sep 17 00:00:00 2001 From: Ariel Rin Date: Sat, 26 Feb 2022 15:52:15 +1000 Subject: [PATCH] switch new task module to new redis method --- allianceauth/authentication/task_statistics/event_series.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/allianceauth/authentication/task_statistics/event_series.py b/allianceauth/authentication/task_statistics/event_series.py index 5799189c..3cdae4f2 100644 --- a/allianceauth/authentication/task_statistics/event_series.py +++ b/allianceauth/authentication/task_statistics/event_series.py @@ -5,7 +5,7 @@ from typing import Optional, List from redis import Redis from pytz import utc -from django.core.cache import cache +from django_redis import get_redis_connection _TaskCounts = namedtuple( "_TaskCounts", ["succeeded", "retried", "failed", "total", "earliest_task", "hours"] @@ -55,7 +55,7 @@ class EventSeries: raise TypeError("Can not instantiate base class.") if not hasattr(self, "KEY_ID"): raise ValueError("KEY_ID not defined") - self._redis = cache.get_master_client() if not redis else redis + self._redis = get_redis_connection("default") if not redis else redis if not isinstance(self._redis, Redis): raise TypeError( "This class requires a Redis client, but none was provided "