Skip to content

Commit 7373fff

Browse files
this is causing Pioreactor/pioreactor#542
1 parent 353f088 commit 7373fff

File tree

1 file changed

+5
-7
lines changed

1 file changed

+5
-7
lines changed

pioreactorui/tasks.py

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,9 @@
33

44
import logging
55
import os
6-
import signal
76
from logging import handlers
87
from shlex import join
9-
from subprocess import check_call as run_and_check_call
8+
from subprocess import check_call
109
from subprocess import DEVNULL
1110
from subprocess import Popen
1211
from subprocess import run
@@ -32,7 +31,7 @@
3231
# this is a hack to get around us not cleaning up / tracking Popen processes. We effectively ignore
3332
# what they do. Note that since this LOC is at the top of this module, PioreactorUI also is affected by
3433
# it. https://stackoverflow.com/questions/16807603/python-non-blocking-non-defunct-process and https://www.philipson.co.il/post/a-subprocess-bug-nah/
35-
signal.signal(signal.SIGCHLD, signal.SIG_IGN)
34+
# signal.signal(signal.SIGCHLD, signal.SIG_IGN)
3635

3736
logger = logging.getLogger("huey.consumer")
3837
logger.setLevel(logging.INFO)
@@ -91,8 +90,7 @@ def pio_run(*args: str, env: dict[str, str] = {}) -> bool:
9190
def add_new_pioreactor(new_pioreactor_name: str, version: str, model: str) -> bool:
9291
command = [PIO_EXECUTABLE, "workers", "add", new_pioreactor_name, "-v", version, "-m", model]
9392
logger.info(f"Executing `{join(command)}`")
94-
result = run_and_check_call(command)
95-
print(result)
93+
check_call(command)
9694
return True
9795

9896

@@ -101,7 +99,7 @@ def update_app_across_cluster() -> bool:
10199
# CPU heavy / IO heavy
102100
logger.info("Updating app on leader")
103101
update_app_on_leader = ["pio", "update", "app"]
104-
run_and_check_call(update_app_on_leader)
102+
check_call(update_app_on_leader)
105103

106104
logger.info("Updating app and ui on workers")
107105
update_app_across_all_workers = [PIOS_EXECUTABLE, "update", "-y"]
@@ -114,7 +112,7 @@ def update_app_from_release_archive_across_cluster(archive_location: str, units:
114112
if units == "$broadcast":
115113
logger.info(f"Updating app on leader from {archive_location}")
116114
update_app_on_leader = ["pio", "update", "app", "--source", archive_location]
117-
run_and_check_call(update_app_on_leader)
115+
check_call(update_app_on_leader)
118116
# remove bits if success
119117

120118
logger.info(f"Updating app and ui on workers from {archive_location}")

0 commit comments

Comments
 (0)