kin: auto-commit after pipeline
This commit is contained in:
parent
f6bccdceb3
commit
c767c6157a
5 changed files with 61 additions and 13 deletions
|
|
@ -543,6 +543,15 @@ def get_pipeline_for_watch(conn: sqlite3.Connection, task_id: str) -> dict | Non
|
|||
return _row_to_dict(row)
|
||||
|
||||
|
||||
def count_agent_logs_since(conn: sqlite3.Connection, task_id: str, since_iso: str) -> int:
|
||||
"""Return number of agent_logs for a task created at or after since_iso."""
|
||||
row = conn.execute(
|
||||
"SELECT COUNT(*) FROM agent_logs WHERE task_id = ? AND created_at >= ?",
|
||||
(task_id, since_iso),
|
||||
).fetchone()
|
||||
return row[0]
|
||||
|
||||
|
||||
def get_current_agent_log(
|
||||
conn: sqlite3.Connection, task_id: str, since_iso: str
|
||||
) -> dict | None:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue