|
AYON Bin Bridge Client
0.1.0
|
Public Member Functions | |
| def | __init__ (self, Callable[[Any], Any] func, Optional[List[Any]] args=[], dict kwargs={}, Union[BaseProgressItem, ProgressItem] progress_item_instance=BaseProgressItem(), Optional[List[uuid.UUID]] dependency_id=None) |
| def | id (self) |
| def | get_uuid (self) |
| def | connect_func_return (self) |
| def | func_return (self, float check_delay=0.1) |
| def | get_progress_item (self) |
| def | start (self) |
Public Attributes | |
| dependency_id | |
Private Attributes | |
| _id | |
| _progress_item | |
| _func | |
| _args | |
| _kwargs | |
| _func_return | |
WorkItem will hold a single function and its dependency's in order to allow organized parallel execution via the Controler class.
the WorkItem can have an optional ProgressItem attached to it if progress should be reported
Attributes:
func: Callable[..., Any] = this will be the function that gets executed
args: = func() arguments
kwargs: = func() kwargs
progress: Optional[ProgressItem] = optional progress object to report back to.
dependenct_id: optional list off ids from a different work item that this work item depends on.
| def ayon_bin_distro.work_handler.worker.WorkItem.__init__ | ( | self, | |
| Callable[[Any], Any] | func, | ||
| Optional[List[Any]] | args = [], |
||
| dict | kwargs = {}, |
||
| Union[ BaseProgressItem, ProgressItem ] | progress_item_instance = BaseProgressItem(), |
||
| Optional[List[uuid.UUID]] | dependency_id = None |
||
| ) |
| def ayon_bin_distro.work_handler.worker.WorkItem.connect_func_return | ( | self | ) |
this function returns what ever the WorkItem._func returns. but its not blocking. it exists so you can have a dependent WorkItem that can use the function return as a value. Returns:
| def ayon_bin_distro.work_handler.worker.WorkItem.func_return | ( | self, | |
| float | check_delay = 0.1 |
||
| ) |
this is a blocking function that checks the return off self._func() in a while loop. This function dose not care if the item has been started Returns: if failed: -1, if finished: func()->Return[Any]
| def ayon_bin_distro.work_handler.worker.WorkItem.get_progress_item | ( | self | ) |
get the connected process item Returns: Union[BaseProgressItem, ProgressItem]
| def ayon_bin_distro.work_handler.worker.WorkItem.get_uuid | ( | self | ) |
get the UUID objectg of this work instance Returns: UUID
| def ayon_bin_distro.work_handler.worker.WorkItem.id | ( | self | ) |
get the hex representation of the UUID of this work instance Returns: UUID.hex
| def ayon_bin_distro.work_handler.worker.WorkItem.start | ( | self | ) |
starts the execution of this work item an starts reporting information to the connected ProgressItem
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
| ayon_bin_distro.work_handler.worker.WorkItem.dependency_id |