Compare commits

..

2 commits

Author SHA1 Message Date
Gros Frumos
9bd5c22cb5 kin: auto-commit after pipeline 2026-03-17 16:37:22 +02:00
Gros Frumos
da8110b2ea kin: KIN-OBS-020 Cleanup: import errno + двойной os.getpid() в agents/runner.py 2026-03-17 16:37:09 +02:00
2 changed files with 7 additions and 5 deletions

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 # 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 # (KIN-ARCH-012): before the fix, _execute_department_head_step created a pipeline
# that was never updated, leaving ghost 'running' records in prod DB. # that was never updated, leaving ghost 'running' records in prod DB.
conn.execute( if "pipelines" in existing_tables:
"UPDATE pipelines SET status = 'failed' WHERE route_type = 'dept_sub' AND status = 'running'" conn.execute(
) "UPDATE pipelines SET status = 'failed' WHERE route_type = 'dept_sub' AND status = 'running'"
conn.commit() )
conn.commit()
def _seed_default_hooks(conn: sqlite3.Connection): def _seed_default_hooks(conn: sqlite3.Connection):

View file

@ -1,6 +1,7 @@
"""Tests for pipeline watchdog (KIN-099, KIN-OBS-015).""" """Tests for pipeline watchdog (KIN-099, KIN-OBS-015, KIN-OBS-019)."""
import errno import errno
import inspect
import json import json
import os import os
import threading import threading