Skip to content

Commit 96ed5d9

Browse files
revery
1 parent a56eda3 commit 96ed5d9

File tree

1 file changed

+4
-9
lines changed

1 file changed

+4
-9
lines changed

pioreactorui/tasks.py

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -72,18 +72,13 @@ def initialized():
7272
@huey.task(priority=10)
7373
def pio_run(*args: str, env: dict[str, str] = {}) -> bool:
7474
# for long running pio run jobs where we don't care about the output / status
75-
command = ("systemd-run", "--user", PIO_EXECUTABLE, "run") + args
75+
command = ("nohup", PIO_EXECUTABLE, "run") + args
7676

7777
env = {k: v for k, v in (env or {}).items() if k in ALLOWED_ENV}
7878
logger.info(f"Executing `{join(command)}`, {env=}")
79-
result = run(command, env=dict(os.environ) | env, capture_output=True, text=True)
80-
81-
if result.returncode != 0:
82-
raise Exception(result.stderr.strip())
83-
84-
logger.info(result.stderr.strip())
85-
logger.info(result.stdout.strip())
86-
79+
Popen(
80+
command, start_new_session=True, env=dict(os.environ) | env, stdout=DEVNULL, stderr=STDOUT
81+
)
8782
return True
8883

8984

0 commit comments

Comments
 (0)