From d5818c64e487bf5a221bea270cb1e0eeb8a8f18f Mon Sep 17 00:00:00 2001 From: Gros Frumos Date: Tue, 17 Mar 2026 18:26:28 +0200 Subject: [PATCH] kin: auto-commit after pipeline --- cli/watch.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cli/watch.py b/cli/watch.py index 4a1d668..e3c8b03 100644 --- a/cli/watch.py +++ b/cli/watch.py @@ -7,7 +7,7 @@ kin ps: one-shot list of all running pipelines with PID and current step. import json import time -from datetime import datetime +from datetime import datetime, timezone from core import models @@ -22,7 +22,7 @@ def _format_elapsed(dt_iso: str) -> str: # SQLite stores "YYYY-MM-DD HH:MM:SS"; fromisoformat requires 'T' in Python < 3.11 normalized = dt_iso.replace(' ', 'T') if ' ' in dt_iso else dt_iso started = datetime.fromisoformat(normalized) - total_secs = int((datetime.utcnow() - started).total_seconds()) + total_secs = int((datetime.now(timezone.utc).replace(tzinfo=None) - started).total_seconds()) if total_secs < 0: total_secs = 0 hours = total_secs // 3600