question about generating new Work Items with a Python Processor TOP

   2263   0   0
User Avatar
Member
22 posts
Joined: June 2006
Offline
I've a Python Processor Top node that has to process partitions coming from the input node.
This is what I'm doing :

for partition in upstream_items:

items = partition.partitionItems
for item in items:
<do stuff for each item>

out_filename = <some filename different per 'partition'>

options = pdg.WorkItemOptions()
options.name = <blabla different per partition>
options.parent = partition
new_item = item_holder.addWorkItem (options)
new_item.addResultData(out_filename, "file/image",0)


Now, this all works, the only problem I have is that the node shows all the work items already cooked only when the node has done processing all the incoming partitions, opposed to …
1 - create the work items when it's processing it
2 - mark the newly created work item as ‘processing’ in bright green
3 - … marking the new work item ‘Finished’ when the result data has been written on disk

My question is : how do I show the node processing the new Work Items *while* it's processing them, like for any other TOP node ?
Edited by mrWolf - April 18, 2019 19:04:54
Alessandro Pepe
http://www.alessandropepe.com [www.alessandropepe.com]
http://pepefx.blogspot.com [pepefx.blogspot.com]
  • Quick Links