From 217152d16ff21a87b70643a0a2571efc91c0aeb9 Mon Sep 17 00:00:00 2001 From: Vojta Udrzal Date: Wed, 21 Apr 2021 08:00:26 +0200 Subject: [PATCH] Add TaskTiger.would_process_configured_queue (#194) --- tasktiger/tasktiger.py | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/tasktiger/tasktiger.py b/tasktiger/tasktiger.py index 7d4e9ce2..86b0f003 100644 --- a/tasktiger/tasktiger.py +++ b/tasktiger/tasktiger.py @@ -591,6 +591,17 @@ def errored_tasks(): return total_processed + def would_process_configured_queue(self, queue_name): + """ + Return if a queue_name would be processed by this tasktiger instance. It does not consider explicit + --queue param. + """ + return queue_matches( + queue_name, + self.config['ONLY_QUEUES'], + self.config['EXCLUDE_QUEUES'], + ) + @click.command() @click.option(