Catch SIGINT between tile builds

Signed-off-by: fly <merspieler@airmail.cc>
This commit is contained in:
fly 2021-03-09 13:13:17 +00:00
parent f2ba15a3d2
commit 9e6693087e

View file

@ -97,14 +97,14 @@ def cleanup():
run("rm -rf projects/worldbuild-" + name, shell=True)
running = True
while running:
try:
running = True
while running:
if api != None:
name = api_get_job(action, api, api_token)
else:
name = get_job(action, host, port)
try:
run("mkdir -p projects/worldbuild-" + name, shell=True)
run("cp projects/worldbuild/params.ini projects/worldbuild-" + name + "/", shell=True)
@ -151,7 +151,7 @@ while running:
api_send_status(name, "done", api, api_token)
else:
send_status(name, "done", host, port)
except KeyboardInterrupt:
except KeyboardInterrupt:
if not quiet:
print("Graceful shutdown triggered. To force immedate stop, press Ctrl+C again")
running = False