Added shot versions for commands

Signed-off-by: fly <merspieler@airmail.cc>
This commit is contained in:
fly 2020-08-27 11:09:04 +00:00
parent 5e645299cd
commit 15046bde16

View file

@ -121,15 +121,15 @@ while running:
print("set workers <n> sets number of workers to <n>")
print("status shows number of running workers")
print("quit stops all workers, then exits")
elif cmd == "status":
elif cmd == "status" or cmd == "sts":
print("Current status:")
print("Max running: " + str(l.run_max))
print("Running: " + str(l.run_count))
print("Shutting down: " + str(l.stop_count))
else:
match = re.match("(set workers) ([0-9]+)", cmd)
match = re.match("(set workers|sw) ([0-9]+)", cmd)
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)))
else:
print("Invalid command. Type 'help' to see available commands")