From 7b06e0381df6e7cb82327a04ffcddd71c0658239 Mon Sep 17 00:00:00 2001 From: Dan Davison Date: Thu, 9 Oct 2025 12:53:50 -0400 Subject: [PATCH] Mimic standalone activity --- temporalio/worker/_activity.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/temporalio/worker/_activity.py b/temporalio/worker/_activity.py index 44bfb6910..a704636fa 100644 --- a/temporalio/worker/_activity.py +++ b/temporalio/worker/_activity.py @@ -151,8 +151,11 @@ async def raise_from_exception_queue() -> NoReturn: poll_task.cancel() await exception_task task = await poll_task - if task.HasField("start"): + # Mimic standalone activity + task.start.workflow_type = "" + task.start.workflow_execution.workflow_id = "" + # Cancelled event and sync field will be updated inside # _run_activity when the activity function is obtained. Max # size of 1000 should be plenty for the heartbeat queue.