fix: preserve task stop intent and guard remote execution boundaries
This commit is contained in:
@@ -60,7 +60,7 @@ class TaskRepository:
|
||||
return from_row(row) if row else None
|
||||
|
||||
async def list(self, assistant_id: str | None = None, *, active=False) -> list[TaskRecord]:
|
||||
statement = select(BackgroundTask).order_by(BackgroundTask.created_at.desc())
|
||||
statement = select(BackgroundTask).order_by(BackgroundTask.status.in_(ACTIVE).desc(), BackgroundTask.created_at.desc())
|
||||
if not active:
|
||||
statement = statement.limit(100)
|
||||
if assistant_id:
|
||||
|
||||
Reference in New Issue
Block a user