kin: KIN-ARCH-013 Починить pre-existing падения миграционных тестов (test_db.py, test_kin_089_regression.py)
This commit is contained in:
parent
8be9a52559
commit
bf635f16ff
2 changed files with 26 additions and 2 deletions
|
|
@ -1139,7 +1139,7 @@ def _execute_department_head_step(
|
|||
try:
|
||||
models.create_handoff(
|
||||
conn,
|
||||
pipeline_id=parent_pipeline_id or child_pipeline["id"],
|
||||
pipeline_id=sub_result.get("pipeline_id") or parent_pipeline_id,
|
||||
task_id=task_id,
|
||||
from_department=dept_name,
|
||||
to_department=next_department,
|
||||
|
|
@ -1216,6 +1216,8 @@ def run_pipeline(
|
|||
allow_write: bool = False,
|
||||
noninteractive: bool = False,
|
||||
initial_previous_output: str | None = None,
|
||||
parent_pipeline_id: int | None = None,
|
||||
department: str | None = None,
|
||||
) -> dict:
|
||||
"""Execute a multi-step pipeline of agents.
|
||||
|
||||
|
|
@ -1258,8 +1260,11 @@ def run_pipeline(
|
|||
# Create pipeline in DB
|
||||
pipeline = None
|
||||
if not dry_run:
|
||||
effective_route_type = "dept_sub" if parent_pipeline_id else route_type
|
||||
pipeline = models.create_pipeline(
|
||||
conn, task_id, project_id, route_type, steps,
|
||||
conn, task_id, project_id, effective_route_type, steps,
|
||||
parent_pipeline_id=parent_pipeline_id,
|
||||
department=department,
|
||||
)
|
||||
# Save PID so watchdog can detect dead subprocesses (KIN-099)
|
||||
models.update_pipeline(conn, pipeline["id"], pid=os.getpid())
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue