Hi Guys,
I am new to deadline scripting, and I am trying to write a simple script plugin that calls a simple python script that calls some simple commandlines. Setting up the plugin is all good. All it does is merge together some Irriadance data into a single giant IRAD Map. If I execute the python script straight from the command prompt, my example job will take about 20 seconds to stitch together a few files and save out the final IRAD Map. But my problem is what happens when I execute the plugin. For simplicty we can simulate the problem using the command script job plugin…
If I execute the same python script by submitting a command script job, then the files take a little longer to write out, but then even when all files have been written out there is still huge amounts of STDOUT data being written out into the slave. This data continues being written out for ages and ages, as in the job can still be writing it out to the slave an hour later! This is causing the job to stay as active, and not complete, even though all the files have successfully been written out. I need the job to complete, so another job (the final render job) which is dependent on this IRAD map, can start.
I have uploaded a small video that demonstrates the problem occuring, it also talks through the example and tries to explain my problem clearly:
3dframework.com/Resources/Pr … Dilema.zip
I have tried suppressing the cast majority of the output by using the lines like:
# Set the stdout handlers.
self.AddStdoutHandler( "Adding samples...*.*", self.HandleStdoutSupress )
def HandleStdoutSupress(self):
self.SuppressThisLine()
This helps a little, but the same job that takes 20 seconds from the command line, takes 4minutes 49seconds with the “Adding samples” STDOUT suppressed (Adding samples … makes us 99% of the STDOUT). I need to get it much faster than this!! The final IRAD for this example is 9mb, but we deal with camera paths where the IRAD is 500mb, so this solution wont scale at all
Is this an STDOUT problem that is slowing? How can I control it better? Can I direct that STDOUT somewhere else, and log my own progress reports instead? If you could point me towards examples of how I can control the STDOUT and the executable, then I would be really grateful!
Thanks for your time everyone.
Cheers,
Rich