From c223d5511b1662fd68fc792e1199e8e11fbc4899 Mon Sep 17 00:00:00 2001 From: Serafeim Papastefanos Date: Thu, 10 Oct 2024 10:57:46 +0300 Subject: [PATCH] Update utils.py --- django_rq/utils.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/django_rq/utils.py b/django_rq/utils.py index 106c6db8..c1d4a509 100644 --- a/django_rq/utils.py +++ b/django_rq/utils.py @@ -110,7 +110,7 @@ def get_scheduler_statistics(): connection = first_sentinel.connection_pool.connection_kwargs else: connection = queue.connection.connection_pool.connection_kwargs - conn_key = f"{connection['host']}:{connection.get('port', 6379)}/{connection.get('db', 0)}" + conn_key = f"{connection.get('host', 'NOHOST')}:{connection.get('port', 6379)}/{connection.get('db', 0)}" if conn_key not in schedulers: try: scheduler = get_scheduler(config['name'])