From e16b89de3b357cbf26ba0b75904886645543bdd7 Mon Sep 17 00:00:00 2001 From: Christophe Olinger Date: Fri, 4 Apr 2014 08:51:18 +0200 Subject: [PATCH] Use get_state() instead of .state in rqinfo --- rq/scripts/rqinfo.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/rq/scripts/rqinfo.py b/rq/scripts/rqinfo.py index 73c1a7c..08b0283 100755 --- a/rq/scripts/rqinfo.py +++ b/rq/scripts/rqinfo.py @@ -101,9 +101,9 @@ def show_workers(args): for w in ws: worker_queues = filter_queues(w.queue_names()) if not args.raw: - print('%s %s: %s' % (w.name, state_symbol(w.state), ', '.join(worker_queues))) + print('%s %s: %s' % (w.name, state_symbol(w.get_state()), ', '.join(worker_queues))) else: - print('worker %s %s %s' % (w.name, w.state, ','.join(worker_queues))) + print('worker %s %s %s' % (w.name, w.get_state(), ','.join(worker_queues))) else: # Create reverse lookup table queues = dict([(q, []) for q in qs]) @@ -116,7 +116,7 @@ def show_workers(args): max_qname = max(map(lambda q: len(q.name), queues.keys())) if queues else 0 for q in queues: if queues[q]: - queues_str = ", ".join(sorted(map(lambda w: '%s (%s)' % (w.name, state_symbol(w.state)), queues[q]))) + queues_str = ", ".join(sorted(map(lambda w: '%s (%s)' % (w.name, state_symbol(w.get_state())), queues[q]))) else: queues_str = '–' print('%s %s' % (pad(q.name + ':', max_qname + 1), queues_str))