feat: expand module workflows, dynamic config, notifications and console API
This commit is contained in:
1 parent
8df5266abb
commit
b124d757b0
309 files changed
+89357
-6231
No files matched your search
@@ -14,7 +14,10 @@ from typing import IO, Mapping
|
||||
import psutil
|
||||
|
||||
from gyxx_flow.core.context import RunContext
|
||||
from gyxx_flow.core.exit_codes import COOKIE_SKIP_EXIT_CODE
|
||||
from gyxx_flow.core.exit_codes import (
|
||||
COOKIE_SKIP_EXIT_CODE,
|
||||
IDEMPOTENT_REPLAY_EXIT_CODE,
|
||||
)
|
||||
from gyxx_flow.core.text import bounded_head_tail
|
||||
|
||||
_CREATE_SUSPENDED = 0x00000004
|
||||
@@ -226,6 +229,15 @@ class CommandStep:
|
||||
reason="cookie-preflight",
|
||||
)
|
||||
|
||||
if return_code == IDEMPOTENT_REPLAY_EXIT_CODE:
|
||||
return StepExecution(
|
||||
exit_code=return_code,
|
||||
stdout=stdout,
|
||||
stderr=stderr,
|
||||
skipped=True,
|
||||
reason="idempotent-replay",
|
||||
)
|
||||
|
||||
error = None
|
||||
if return_code != 0:
|
||||
error = _command_failure_detail(
|
||||
@@ -249,9 +261,16 @@ def _start_process(
|
||||
stdout: IO[str],
|
||||
stderr: IO[str],
|
||||
) -> tuple[subprocess.Popen[str], _WindowsJob | None]:
|
||||
effective_env = dict(env)
|
||||
if os.name == "nt":
|
||||
# Python launched with redirected stdio can otherwise inherit the
|
||||
# Windows ANSI code page (typically GBK), while the parent streams
|
||||
# are opened as UTF-8. Keep child diagnostics readable in journals
|
||||
# and the console, especially for Chinese business errors.
|
||||
effective_env.setdefault("PYTHONIOENCODING", "utf-8")
|
||||
common = {
|
||||
"cwd": cwd,
|
||||
"env": env,
|
||||
"env": effective_env,
|
||||
"shell": False,
|
||||
"stdout": stdout,
|
||||
"stderr": stderr,
|
||||
|
||||
Reference in new issue
Block a user