From 97189527774a46a064be63dd974a323363669102 Mon Sep 17 00:00:00 2001 From: Dylan Brasseur Date: Fri, 19 Jul 2024 10:36:27 +0200 Subject: [PATCH] Added payload id in python package --- packages/python/src/armonik/common/objects.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/packages/python/src/armonik/common/objects.py b/packages/python/src/armonik/common/objects.py index ead6d712e..7e1a6e089 100644 --- a/packages/python/src/armonik/common/objects.py +++ b/packages/python/src/armonik/common/objects.py @@ -130,6 +130,8 @@ class Task: pod_hostname: Optional[str] = None + payload_id: Optional[str] = None + def refresh(self, task_client) -> None: """Refresh the fields of this task object by using the given task client @@ -167,6 +169,7 @@ def refresh(self, task_client) -> None: self.output = result.output self.pod_hostname = result.pod_hostname + self.payload_id = result.payload_id self.is_init = True @classmethod @@ -197,6 +200,7 @@ def from_message(cls, task_raw: TaskDetailed) -> "Task": received_to_end_duration=duration_to_timedelta(task_raw.received_to_end_duration), output=Output(error=(task_raw.output.error if not task_raw.output.success else None)), pod_hostname=task_raw.pod_hostname, + payload_id=task_raw.payload_id )