v1.0.99: debug logging for save_run — will show why it fails

This commit is contained in:
2026-07-28 10:42:43 +04:00
parent 10ec617c74
commit 3dbddda858
3 changed files with 7 additions and 3 deletions
+2
View File
@@ -12,6 +12,7 @@ def save_run(client_id, stand, user_email, svc_id, svc_name, op_name, svc_op_id,
"""Сохранить один запуск в таблицу runs."""
conn = get_conn()
if not conn:
print("[DB] save_run SKIP: no connection", flush=True)
return
try:
@@ -31,6 +32,7 @@ def save_run(client_id, stand, user_email, svc_id, svc_name, op_name, svc_op_id,
))
conn.commit()
cur.close()
print(f"[DB] save_run OK: {op_name} {status} {duration_sec}s", flush=True)
except Exception as e:
print(f"[DB] save_run error: {e}", flush=True)
conn.rollback()