made the slay mechanism more useful (slay by number, not just announced participant)
This commit is contained in:
parent
d61a9dadba
commit
d5a0d969f8
12
bin/iqmgr.py
12
bin/iqmgr.py
@ -21,9 +21,15 @@ if sys.argv[1].startswith("st"):
|
|||||||
print " slavesq : %d" % sq.qsize()
|
print " slavesq : %d" % sq.qsize()
|
||||||
|
|
||||||
if sys.argv[1] == 'slay':
|
if sys.argv[1] == 'slay':
|
||||||
for i in xrange(mq.qsize()):
|
if len(sys.argv) == 2:
|
||||||
print i, "killing", mq.get()
|
for i in xrange(mq.qsize()):
|
||||||
sq.put("slay")
|
print i, "killing", mq.get()
|
||||||
|
sq.put("slay")
|
||||||
|
elif len(sys.argv) == 3:
|
||||||
|
for i in xrange(int(sys.argv[2])):
|
||||||
|
print i, "killing ... jane?"
|
||||||
|
sq.put("slay")
|
||||||
|
|
||||||
|
|
||||||
if sys.argv[1] == 'clear':
|
if sys.argv[1] == 'clear':
|
||||||
for i in xrange(tq.qsize()): print tq.get()
|
for i in xrange(tq.qsize()): print tq.get()
|
||||||
|
Loading…
Reference in New Issue
Block a user