generated from coulomb/repo-seed
feat(workflows): TaskExecutorWorkflow stub + wire worker — T19/T20
activities.py — persist_task_instance (new): Idempotent INSERT ... ON CONFLICT (id) DO NOTHING on task_instances. task_id passed in from workflow (derived from workflow_id via uuid5). Registered on task-execution-tq. workflows.py — TaskExecutorWorkflow (T19): Derives stable task_id = uuid5(NAMESPACE_URL, workflow_id). Calls persist_task_instance → status=done, returns immediately. Real execution logic to replace stub in a later workstream. worker.py — T20: Registers persist_task_instance on task-execution-tq Worker. Both queues fully wired: orchestrator-tq and task-execution-tq. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -27,6 +27,7 @@ from activity_core.activities import (
|
||||
init_session_factory,
|
||||
load_activity_definition,
|
||||
log_run,
|
||||
persist_task_instance,
|
||||
resolve_context,
|
||||
)
|
||||
from activity_core.workflows import RunActivityWorkflow, TaskExecutorWorkflow
|
||||
@@ -57,7 +58,7 @@ async def run() -> None:
|
||||
client,
|
||||
task_queue=TASK_EXECUTION_TASK_QUEUE,
|
||||
workflows=[TaskExecutorWorkflow],
|
||||
activities=[],
|
||||
activities=[persist_task_instance],
|
||||
)
|
||||
|
||||
async with orchestrator_worker, task_worker:
|
||||
|
||||
Reference in New Issue
Block a user