kin: KIN-OBS-020 Cleanup: import errno + двойной os.getpid() в agents/runner.py

This commit is contained in:
Gros Frumos 2026-03-17 16:37:09 +02:00
parent 8fa2cc266c
commit da8110b2ea

View file

@ -663,10 +663,11 @@ def _migrate(conn: sqlite3.Connection):
# Fix orphaned dept_sub pipelines left in 'running' state due to double-create bug
# (KIN-ARCH-012): before the fix, _execute_department_head_step created a pipeline
# that was never updated, leaving ghost 'running' records in prod DB.
conn.execute(
"UPDATE pipelines SET status = 'failed' WHERE route_type = 'dept_sub' AND status = 'running'"
)
conn.commit()
if "pipelines" in existing_tables:
conn.execute(
"UPDATE pipelines SET status = 'failed' WHERE route_type = 'dept_sub' AND status = 'running'"
)
conn.commit()
def _seed_default_hooks(conn: sqlite3.Connection):