Enhance agent workflows and tools: unify subscription and download processes, add site querying functionality, and improve error handling in download operations.

This commit is contained in:
jxxghp
2025-11-17 11:39:08 +08:00
parent a5e7483870
commit 043be409d0
9 changed files with 220 additions and 44 deletions
+6
View File
@@ -66,6 +66,12 @@ class Site(Base):
result = await db.execute(select(cls).where(cls.domain == domain))
return result.scalar_one_or_none()
@classmethod
@async_db_query
async def async_get_by_name(cls, db: AsyncSession, name: str):
result = await db.execute(select(cls).where(cls.name == name))
return result.scalar_one_or_none()
@classmethod
@db_query
def get_actives(cls, db: Session):