Skip to content

Commit fe82b26

Browse files
authored
Merge pull request #447 from revsys/bugfix/fix-broken-celery-ping-test
Added DS_Store to ignore and fixed the broken test which supports new…
2 parents 50424c1 + bc52f40 commit fe82b26

File tree

2 files changed

+4
-6
lines changed

2 files changed

+4
-6
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -105,3 +105,4 @@ ENV/
105105

106106
.envrc
107107
.direnv
108+
.DS_Store

health_check/contrib/celery_ping/backends.py

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -50,12 +50,9 @@ def _check_ping_result(self, ping_result):
5050
self._check_active_queues(active_workers)
5151

5252
def _check_active_queues(self, active_workers):
53-
try:
54-
# Celery 4+
55-
defined_queues = app.conf.task_queues
56-
except AttributeError:
57-
# Celery <4
58-
defined_queues = app.conf.CELERY_QUEUES
53+
defined_queues = getattr(app.conf, "task_queues", None) or getattr(
54+
app.conf, "CELERY_QUEUES", None
55+
)
5956

6057
if not defined_queues:
6158
return

0 commit comments

Comments
 (0)