Skip to content

Commit d54174a

Browse files
committed
Add to child workflow
1 parent d31790f commit d54174a

File tree

3 files changed

+10
-0
lines changed

3 files changed

+10
-0
lines changed

temporalio/worker/_interceptor.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -246,6 +246,7 @@ class StartActivityInput:
246246
headers: Mapping[str, temporalio.api.common.v1.Payload]
247247
disable_eager_execution: bool
248248
versioning_intent: Optional[VersioningIntent]
249+
summary: Optional[str]
249250
# The types may be absent
250251
arg_types: Optional[List[Type]]
251252
ret_type: Optional[Type]

temporalio/worker/_workflow_instance.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1159,6 +1159,7 @@ def workflow_start_activity(
11591159
cancellation_type: temporalio.workflow.ActivityCancellationType,
11601160
activity_id: Optional[str],
11611161
versioning_intent: Optional[temporalio.workflow.VersioningIntent],
1162+
summary: Optional[str] = None,
11621163
) -> temporalio.workflow.ActivityHandle[Any]:
11631164
self._assert_not_read_only("start activity")
11641165
# Get activity definition if it's callable
@@ -1194,6 +1195,7 @@ def workflow_start_activity(
11941195
arg_types=arg_types,
11951196
ret_type=ret_type,
11961197
versioning_intent=versioning_intent,
1198+
summary=summary,
11971199
)
11981200
)
11991201

@@ -2369,6 +2371,8 @@ def _apply_schedule_command(
23692371
command.schedule_activity.versioning_intent = (
23702372
self._input.versioning_intent._to_proto()
23712373
)
2374+
# if self._input.summary:
2375+
# command.
23722376
if isinstance(self._input, StartLocalActivityInput):
23732377
if self._input.local_retry_threshold:
23742378
command.schedule_local_activity.local_retry_threshold.FromTimedelta(

temporalio/workflow.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -659,6 +659,7 @@ def workflow_start_activity(
659659
cancellation_type: ActivityCancellationType,
660660
activity_id: Optional[str],
661661
versioning_intent: Optional[VersioningIntent],
662+
summary: Optional[str] = None,
662663
) -> ActivityHandle[Any]: ...
663664

664665
@abstractmethod
@@ -1869,6 +1870,7 @@ def start_activity(
18691870
cancellation_type: ActivityCancellationType = ActivityCancellationType.TRY_CANCEL,
18701871
activity_id: Optional[str] = None,
18711872
versioning_intent: Optional[VersioningIntent] = None,
1873+
summary: Optional[str] = None,
18721874
) -> ActivityHandle[Any]:
18731875
"""Start an activity and return its handle.
18741876
@@ -1902,6 +1904,8 @@ def start_activity(
19021904
need to. Contact Temporal before setting this value.
19031905
versioning_intent: When using the Worker Versioning feature, specifies whether this Activity
19041906
should run on a worker with a compatible Build Id or not.
1907+
summary: Gets or sets a single-line fixed summary for this activity that may appear in UI/CLI.
1908+
This can be in single-line Temporal markdown format.
19051909
19061910
Returns:
19071911
An activity handle to the activity which is an async task.
@@ -1919,6 +1923,7 @@ def start_activity(
19191923
cancellation_type=cancellation_type,
19201924
activity_id=activity_id,
19211925
versioning_intent=versioning_intent,
1926+
summary=summary,
19221927
)
19231928

19241929

0 commit comments

Comments
 (0)