Skip to content

Commit

Permalink
fixes #1254 (#1255)
Browse files Browse the repository at this point in the history
add transport prefix to list names queried by LLEN to get number of messages in the redis queue when app.conf.broker_transport_options = {'global_keyprefix': "test-prefix-" }.
Without this, the list name queried for length does not exist, which return a length of 0.
  • Loading branch information
timrichardson authored Nov 14, 2022
1 parent e06f275 commit a4fc7c9
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion flower/utils/broker.py
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,7 @@ def __init__(self, broker_url, *args, **kwargs):
self.priority_steps = broker_options.get(
'priority_steps', self.DEFAULT_PRIORITY_STEPS)
self.sep = broker_options.get('sep', self.DEFAULT_SEP)
self.broker_prefix = broker_options.get('global_keyprefix', '')

def _q_for_pri(self, queue, pri):
if pri not in self.priority_steps:
Expand All @@ -119,7 +120,7 @@ def _q_for_pri(self, queue, pri):
def queues(self, names):
queue_stats = []
for name in names:
priority_names = [self._q_for_pri(
priority_names = [self.broker_prefix + self._q_for_pri(
name, pri) for pri in self.priority_steps]
queue_stats.append({
'name': name,
Expand Down

0 comments on commit a4fc7c9

Please sign in to comment.