A container object for construct new PDG work items, by passing a pdg.WorkItemOptions
object or a key/value arguments to the
Constructs a new work item and adds it to the holder. This function can either take a pdg.WorkItemOptions object, or a keyword arguments matching the supported values in the work item options object.
# Using keyword arguments item_holder.addWorkItem(name="example", index=5) # Using an options object options = pdg.WorkItemOptions() options.name = "otherexample" options.cloneResultData = True item_holder.addWorkItem(options) # Combination item_holder.addWorkItem(options, name='overridename')
Commits work items currently in this holder and moves them into the node. The holder is reset after calling this function.
Sets the commit count for this holder. Once that number of work items have been added, the list of pending items is moved from the holder to the PDG node and the holder is reset.
The array of batch work items that have been processed by this holder. Unlike the
batches method, this list is not cleared when items are committed to the node.
The array of work items that have been processed by this holder. Unlike the
workItems method, this list is not cleared when items are committed to the node.
The array of batch work items currently in the holder. This list is cleared each time work items are committed.
The number of work items that can be added to the holder before it copies its contents into the PDG node. Once this this value is reached the pending work items are added to the node and the holder is reset.
True if the holder is empty, else
The array of work items currently in the holder. This list is cleared each time work items are committed.
Methods from pdg.DependencyHolder
Used when this object is passed to a mapping callback on a node. Makes the
child pdg.WorkItem object depend on the
parent work item object.
The order of the arguments only matters when you're creating a dependency between two work items in the same node. Otherwise, the code will notice if you try to make an upstream item dependent on a downstream item, and flip the order for you.