feat: implement task dependencies with validation and update handling
This commit is contained in:
@@ -22,9 +22,7 @@ class AgentAuthContext:
|
||||
|
||||
|
||||
async def _find_agent_for_token(session: AsyncSession, token: str) -> Agent | None:
|
||||
agents = list(
|
||||
await session.exec(select(Agent).where(col(Agent.agent_token_hash).is_not(None)))
|
||||
)
|
||||
agents = list(await session.exec(select(Agent).where(col(Agent.agent_token_hash).is_not(None))))
|
||||
for agent in agents:
|
||||
if agent.agent_token_hash and verify_agent_token(token, agent.agent_token_hash):
|
||||
return agent
|
||||
|
||||
@@ -34,4 +34,3 @@ def parse_every_to_seconds(value: str) -> int:
|
||||
if seconds > 60 * 60 * 24 * 365 * 10:
|
||||
raise ValueError("Schedule is too large (max 10 years).")
|
||||
return seconds
|
||||
|
||||
|
||||
Reference in New Issue
Block a user