refactor: finish transactional runtime migration

This commit is contained in:
jxxghp
2026-08-22 15:18:16 +08:00
parent fe2e6809f7
commit be18cace1f
59 changed files with 1006 additions and 568 deletions
+1 -5
View File
@@ -4,7 +4,7 @@ from sqlalchemy import Index, Integer, String, Text, delete, select, update
from sqlalchemy.orm import Mapped, Session, mapped_column
from app.db.base import Base, execute_dml, get_id_column
from app.db.decorators import db_query, db_update
from app.db.decorators import db_query
from app.db.models.agenttask import AgentTask
@@ -41,7 +41,6 @@ class AgentTaskRun(Base):
)
@classmethod
@db_update
def begin_run(
cls,
db: Session,
@@ -107,7 +106,6 @@ class AgentTaskRun(Base):
return run_id
@classmethod
@db_update
def finish_run(
cls,
db: Session,
@@ -174,7 +172,6 @@ class AgentTaskRun(Base):
return True
@classmethod
@db_update
def interrupt_task(
cls,
db: Session,
@@ -226,7 +223,6 @@ class AgentTaskRun(Base):
))
@classmethod
@db_update
def delete_task_and_runs(
cls,
db: Session,