Skip to content

Commit 94e2554

Browse files
committed
feat: add deployment_name to workflow start event
1 parent ce6e4d4 commit 94e2554

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

application_sdk/events/models.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -155,6 +155,7 @@ class WorkerStartEventData(BaseModel):
155155
156156
Attributes:
157157
application_name: Name of the application the worker belongs to.
158+
deployment_name: Name of the deployment the worker belongs to.
158159
task_queue: Task queue name for the worker.
159160
namespace: Temporal namespace for the worker.
160161
host: Host address of the Temporal server.
@@ -167,6 +168,7 @@ class WorkerStartEventData(BaseModel):
167168

168169
version: str = WORKER_START_EVENT_VERSION
169170
application_name: str
171+
deployment_name: str
170172
task_queue: str
171173
namespace: str
172174
host: str

application_sdk/worker.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
from temporalio.worker import Worker as TemporalWorker
1515

1616
from application_sdk.clients.workflow import WorkflowClient
17-
from application_sdk.constants import MAX_CONCURRENT_ACTIVITIES
17+
from application_sdk.constants import DEPLOYMENT_NAME, MAX_CONCURRENT_ACTIVITIES
1818
from application_sdk.events.models import (
1919
ApplicationEventNames,
2020
Event,
@@ -122,6 +122,7 @@ def __init__(
122122
if self.workflow_client:
123123
self._worker_creation_event_data = WorkerStartEventData(
124124
application_name=self.workflow_client.application_name,
125+
deployment_name=DEPLOYMENT_NAME,
125126
task_queue=self.workflow_client.worker_task_queue,
126127
namespace=self.workflow_client.namespace,
127128
host=self.workflow_client.host,

0 commit comments

Comments
 (0)