OnTask callbacks

Hey,

I was wondering why there aren’t any OnTask callbacks for event plugins?

The callbacks would probably mirror the OnJob callbacks, so “OnTaskFinishedCallback”, “OnTaskFailedCallback” etc., but have the task object and maybe the job object as well passed in.

The concern was always about performance. Imagine 50,000 Deadline jobs each containing 100 tasks - worst case, you could have 5 million callbacks executing at exactly the same time. Unlikely, but you get my point. A key bit of technology we wanted to put in place was a local caching system for all plugins, events, scripts. This has now been achieved with D8.0. So maybe…

Thought it might have been :slight_smile:

My current situation is that I would like to copy frames across continuously as the tasks gets completed, so we don’t have to wait for a long copy process when the job finishes. Would have been nice to just work with a “OnTaskFinished” callback.
Working around it with using “OnSlaveStartingJob”, as this is only event that get emitted continously through the job rendering, and storing the already copied frames on the job properties.

I would just use a Post Task Script:
docs.thinkboxsoftware.com/produc … ml#scripts
(Obviously, you need to make sure the py script is added to each job that needs to run this script after each task has completed). You could use another event plugin onJobSubmitted, to ensure the post task script is assigned to all/certain jobs.

That is loads better! Thanks Mike :slight_smile:

No worries. Forgot to include this link as an example:
docs.thinkboxsoftware.com/produc … ripts.html

Don’t forget to make sure you have a main function and our example shows how to access the output files in a post task script, which is a pretty common kinda thing to want. As this py script will be executing within the Deadline environment, you can write something back to the job object if you need to keep track.