Search - User list
Full Version: Python Processor command parameter (scheduling problems)
Root » PDG/TOPs » Python Processor command parameter (scheduling problems)
matt_t
Hi,

I'm trying to get to grips with Python Processor TOP. I'm doing a simple ROP Geometry Sample clone that manually creates the ROP geometry node and renders it all inside the onCookTask function. I am using a Tractor scheduler but no matter what I put in the “Command” parameter of the Python Processor it does not seem to schedule. The parm's help says if left blank the work items are not scheduled so I'm guessing I might be using the wrong format or something.

Setting the new work items the processor creates to “inProcess” cooks and runs okay, so I'm confident the Python source itself is solid.

Any ideas?

Cheers,

Matt
tpetrick
The onCookTask callback code is for running work items in process. It won't use the scheduler because it's not scheduled as a standalone process. If you want to run a work item out of process, you should leave “inProcess” disabled and save the code you want to run to an external Python file. Also, make sure to set the command on the work item using something like the following:

work_item = item_holder.addWorkItem()
work_item.setCommand(self["command"].evaluateString())
matt_t
It was that final step of setting the command on the work item after it gets created that I was missing. Thanks!
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Powered by DjangoBB