v1.0.99: debug logging for save_run — will show why it fails
This commit is contained in:
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user