Check if build is still running
Signed-off-by: fly <merspieler@airmail.cc>
This commit is contained in:
parent
9e6693087e
commit
d245ba9844
1 changed files with 4 additions and 2 deletions
|
@ -96,7 +96,7 @@ def cleanup():
|
||||||
|
|
||||||
run("rm -rf projects/worldbuild-" + name, shell=True)
|
run("rm -rf projects/worldbuild-" + name, shell=True)
|
||||||
|
|
||||||
|
build = None
|
||||||
try:
|
try:
|
||||||
running = True
|
running = True
|
||||||
while running:
|
while running:
|
||||||
|
@ -144,6 +144,7 @@ try:
|
||||||
build = Popen("./build -S 10 -t 1 worldbuild-" + name, stdout=log_file, stderr=STDOUT, shell=True, start_new_session=True)
|
build = Popen("./build -S 10 -t 1 worldbuild-" + name, stdout=log_file, stderr=STDOUT, shell=True, start_new_session=True)
|
||||||
|
|
||||||
build.wait()
|
build.wait()
|
||||||
|
build = None
|
||||||
|
|
||||||
cleanup()
|
cleanup()
|
||||||
|
|
||||||
|
@ -156,6 +157,7 @@ except KeyboardInterrupt:
|
||||||
print("Graceful shutdown triggered. To force immedate stop, press Ctrl+C again")
|
print("Graceful shutdown triggered. To force immedate stop, press Ctrl+C again")
|
||||||
running = False
|
running = False
|
||||||
try:
|
try:
|
||||||
|
if build != None:
|
||||||
build.wait()
|
build.wait()
|
||||||
cleanup()
|
cleanup()
|
||||||
if api != None:
|
if api != None:
|
||||||
|
|
Loading…
Reference in a new issue