Skip to content

Commit

Permalink
Added payload id in python package
Browse files Browse the repository at this point in the history
  • Loading branch information
dbrasseur-aneo committed Jul 19, 2024
1 parent a610b84 commit 9718952
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions packages/python/src/armonik/common/objects.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
)


Expand Down

0 comments on commit 9718952

Please sign in to comment.