From b1f571e920ec0fc072eb9f04e3bd93e6bb055548 Mon Sep 17 00:00:00 2001 From: Vincent Driessen Date: Mon, 28 Nov 2011 11:40:45 +0100 Subject: [PATCH] Move function up. --- bin/rqinfo | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/bin/rqinfo b/bin/rqinfo index e5990d85..5466a49d 100755 --- a/bin/rqinfo +++ b/bin/rqinfo @@ -23,6 +23,16 @@ def get_scale(x): return scale return x +def state_symbol(state): + symbols = { + 'busy': red(u'\u25CF'), + 'idle': green(u'\u25CB'), + } + try: + return symbols[state] + except KeyError: + return state + def parse_args(): parser = optparse.OptionParser() @@ -85,16 +95,6 @@ def show_queues(opts, args, parser): else: break -def state_symbol(state): - symbols = { - 'busy': red(u'\u25CF'), - 'idle': green(u'\u25CB'), - } - try: - return symbols[state] - except KeyError: - return state - def show_workers(opts, args, parser): while True: qs = Queue.all()