Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions temporalio/worker/_interceptor.py
Original file line number Diff line number Diff line change
Expand Up @@ -351,6 +351,8 @@ class StartLocalActivityInput:
local_retry_threshold: Optional[timedelta]
cancellation_type: temporalio.workflow.ActivityCancellationType
headers: Mapping[str, temporalio.api.common.v1.Payload]
summary: Optional[str]

# The types may be absent
arg_types: Optional[List[Type]]
ret_type: Optional[Type]
Expand Down
11 changes: 7 additions & 4 deletions temporalio/worker/_workflow_instance.py
Original file line number Diff line number Diff line change
Expand Up @@ -1458,6 +1458,7 @@ def workflow_start_local_activity(
local_retry_threshold: Optional[timedelta],
cancellation_type: temporalio.workflow.ActivityCancellationType,
activity_id: Optional[str],
summary: Optional[str],
) -> temporalio.workflow.ActivityHandle[Any]:
# Get activity definition if it's callable
name: str
Expand Down Expand Up @@ -1490,6 +1491,7 @@ def workflow_start_local_activity(
retry_policy=retry_policy,
local_retry_threshold=local_retry_threshold,
cancellation_type=cancellation_type,
summary=summary,
headers={},
arg_types=arg_types,
ret_type=ret_type,
Expand Down Expand Up @@ -2756,6 +2758,11 @@ def _apply_schedule_command(
v.start_to_close_timeout.FromTimedelta(self._input.start_to_close_timeout)
if self._input.retry_policy:
self._input.retry_policy.apply_to_proto(v.retry_policy)
if self._input.summary:
print("copying summary")
command.user_metadata.summary.CopyFrom(
self._instance._payload_converter.to_payload(self._input.summary)
)
v.cancellation_type = cast(
"temporalio.bridge.proto.workflow_commands.ActivityCancellationType.ValueType",
int(self._input.cancellation_type),
Expand All @@ -2777,10 +2784,6 @@ def _apply_schedule_command(
command.schedule_activity.versioning_intent = (
self._input.versioning_intent._to_proto()
)
if self._input.summary:
command.user_metadata.summary.CopyFrom(
self._instance._payload_converter.to_payload(self._input.summary)
)
if self._input.priority:
command.schedule_activity.priority.CopyFrom(
self._input.priority._to_proto()
Expand Down
Loading