AWS Thinkbox Discussion Forums

Task Progress on Python Job

Is there a way to pickup the progress of a task from a python job or add some kind of print statement to update the progress? We’re currently wrapping ffmpeg in a python command and it would be useful to pick up the progress of the task in the Monitor.

Hello,

I don’t think the Python plugin has any code for handling progress, since it’s a general purpose plugin, so you would want to write a custom plugin to do this, where it would include progress tracking. You could probably mash one of our more complicated plugins into a renamed python plugin to make it into a more powerful python plugin. Does this sound doable for you?

Sounds like something I could do, I thought it would be a case of getting the code from a different plugin to do it anyway. What would be the best plugin to base it on?

The Python plugin actually does now have progress reporting. I’m pretty sure Mike added it.

        self.AddStdoutHandlerCallback( ".*Progress: (\d+)%.*" ).HandleCallback += self.HandleProgress

...

    def HandleProgress( self ):
        progress = float( self.GetRegexMatch(1) )
        self.SetProgress( progress )

So, just print “Progress: 88%” and it should pick it up.

Hi Edwin, Took me a while to get around to sorting this out but it works a treat. Thanks!

Nick

Glad to hear it Nick! Have a good one.

Privacy | Site terms | Cookie preferences