Skip to content

Commit

Permalink
bug: ctl: list_queues JSON: ignore source queues of collectors
Browse files Browse the repository at this point in the history
as collectors don't have source queues, don't report any (always zero)
size for their source queues.
This was introduced with the rewrite to the
pipeline-runtime-configuration merge, as the source queues got default
values, independent if they are useful or not
  • Loading branch information
Sebastian Wagner committed Jun 25, 2021
1 parent 2dd7c98 commit 761148c
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion intelmq/bin/intelmqctl.py
Original file line number Diff line number Diff line change
Expand Up @@ -1331,7 +1331,10 @@ def list_queues(self, non_zero=False, count=False):
for bot_id, info in self._pipeline_configuration().items():
return_dict[bot_id] = {}

if 'source_queue' in info:
# Do not report source queues for collectors
if 'source_queue' in info and not (
self.runtime_configuration[bot_id].get('group', None) == 'Collector' or
self.runtime_configuration[bot_id].get('groupname', None) == 'collectors'):
return_dict[bot_id]['source_queue'] = (
info['source_queue'], counters[info['source_queue']])
if pipeline.has_internal_queues:
Expand Down

0 comments on commit 761148c

Please sign in to comment.