mirror of https://github.com/rq/rq.git
Move function up.
This commit is contained in:
parent
2c72d94ebd
commit
b1f571e920
20
bin/rqinfo
20
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()
|
||||
|
|
Loading…
Reference in New Issue