Skip to main content

WorkItemInfo

This interface represents the result of processing a work item, providing access to the processed item, its unique identifier, current status, and any associated error.

Methods


Item()

@classmethod
def Item() - > [WorkItem](workitem.md?sid=flyteplugins_go_tasks_pluginmachinery_workqueue_workitem)

Retrieves the WorkItem associated with this processing result. Callers use this to access the original work item that was processed.

Returns

TypeDescription
[WorkItem](workitem.md?sid=flyteplugins_go_tasks_pluginmachinery_workqueue_workitem)The WorkItem that was processed.

ID()

@classmethod
def ID() - > [WorkItemID](workitemid.md?sid=flyteplugins_go_tasks_pluginmachinery_workqueue_workitemid)

Fetches the unique identifier for the work item. This ID can be used to reference the specific work item within a system.

Returns

TypeDescription
[WorkItemID](workitemid.md?sid=flyteplugins_go_tasks_pluginmachinery_workqueue_workitemid)The unique identifier of the work item.

Status()

@classmethod
def Status() - > [WorkStatus](workstatus.md?sid=flyteplugins_go_tasks_pluginmachinery_workqueue_workstatus)

Returns the current processing status of the work item. Callers use this to determine if the work item was successfully processed, is pending, or encountered issues.

Returns

TypeDescription
[WorkStatus](workstatus.md?sid=flyteplugins_go_tasks_pluginmachinery_workqueue_workstatus)The current status of the work item processing.

Error()

@classmethod
def Error() - > error

Retrieves any error that occurred during the processing of the work item. Callers should check this to understand why a work item might have failed.

Returns

TypeDescription
errorAn error object if processing failed, otherwise nil.