Move function up.

This commit is contained in:
Vincent Driessen 2011-11-28 11:40:45 +01:00
parent 2c72d94ebd
commit b1f571e920
1 changed files with 10 additions and 10 deletions

View File

@ -23,6 +23,16 @@ def get_scale(x):
return scale return scale
return x 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(): def parse_args():
parser = optparse.OptionParser() parser = optparse.OptionParser()
@ -85,16 +95,6 @@ def show_queues(opts, args, parser):
else: else:
break 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): def show_workers(opts, args, parser):
while True: while True:
qs = Queue.all() qs = Queue.all()