refactor(automations): move agent_task to builtin and restructure dispatch

This commit is contained in:
CREDO23 2026-05-29 18:13:09 +02:00
parent f356e304e8
commit 30fff9e52f
22 changed files with 142 additions and 133 deletions

View file

@ -13,7 +13,7 @@ from typing import Any
from sqlalchemy import select
from sqlalchemy.ext.asyncio import AsyncSession
from app.automations.dispatch import start_run
from app.automations.dispatch import launch_run
from app.automations.persistence.enums.trigger_type import TriggerType
from app.automations.persistence.models.trigger import AutomationTrigger
from app.celery_app import celery_app
@ -58,7 +58,7 @@ async def _start_one(
session: AsyncSession, *, trigger: AutomationTrigger, event: Event
) -> None:
try:
run = await start_run(
run = await launch_run(
session=session,
trigger=trigger,
runtime_inputs=event_runtime_inputs(event),

View file

@ -18,7 +18,7 @@ from datetime import UTC, datetime
from sqlalchemy import select
from sqlalchemy.ext.asyncio import AsyncSession
from app.automations.dispatch import start_run
from app.automations.dispatch import launch_run
from app.automations.persistence.enums.trigger_type import TriggerType
from app.automations.persistence.models.trigger import AutomationTrigger
from app.celery_app import celery_app
@ -159,7 +159,7 @@ async def _start_one(
return
try:
run = await start_run(
run = await launch_run(
session=session,
trigger=trigger,
runtime_inputs=schedule_runtime_inputs(