Added shot versions for commands
Signed-off-by: fly <merspieler@airmail.cc>
This commit is contained in:
parent
5e645299cd
commit
15046bde16
1 changed files with 3 additions and 3 deletions
|
@ -121,15 +121,15 @@ while running:
|
||||||
print("set workers <n> sets number of workers to <n>")
|
print("set workers <n> sets number of workers to <n>")
|
||||||
print("status shows number of running workers")
|
print("status shows number of running workers")
|
||||||
print("quit stops all workers, then exits")
|
print("quit stops all workers, then exits")
|
||||||
elif cmd == "status":
|
elif cmd == "status" or cmd == "sts":
|
||||||
print("Current status:")
|
print("Current status:")
|
||||||
print("Max running: " + str(l.run_max))
|
print("Max running: " + str(l.run_max))
|
||||||
print("Running: " + str(l.run_count))
|
print("Running: " + str(l.run_count))
|
||||||
print("Shutting down: " + str(l.stop_count))
|
print("Shutting down: " + str(l.stop_count))
|
||||||
else:
|
else:
|
||||||
match = re.match("(set workers) ([0-9]+)", cmd)
|
match = re.match("(set workers|sw) ([0-9]+)", cmd)
|
||||||
if match != None:
|
if match != None:
|
||||||
if match.group(1) == "set workers":
|
if match.group(1) == "set workers" or match.group(1) == "sw":
|
||||||
l.set_proc_count(int(match.group(2)))
|
l.set_proc_count(int(match.group(2)))
|
||||||
else:
|
else:
|
||||||
print("Invalid command. Type 'help' to see available commands")
|
print("Invalid command. Type 'help' to see available commands")
|
||||||
|
|
Loading…
Add table
Reference in a new issue