Global shared JobPreLoad.py script

We just across the issues that we wanted to expose some of the deadline job settings to the shell environment the job runs in via environment variables.

e.g.:

  • Deadline Job abc
    – Property: Priority: 80

  • Deadline Slave execution shell environment
    – environment variables contain for example “deadline_priority” with value “80”

Now we could easily do this in the JobPerLoad.py. But we would have to do that for every plugin separately.
I know they all could import the same shared GlobalPreLoad.py but we still have to change all plugins to import this script.

So the feature request is to have this as a build-in functionality in Deadline 7.
The same way as JobPerLoad.py is automatically loaded on job startup a GlobalPreLoad.py is imported and executed beforehand.
I’m sure studios will come up with lots of code & customizations to put in there and so it felt better if it was supported directly within deadline.

Thanks for considering and implementing it! :slight_smile:
Patrick

I like the idea, Patrick. It might also make sense to have RegionJobPreLoad.py as well that loads on a per-region basis, since cloud slaves or remote office slaves might need different settings. So they would get loaded in order of GlobalJobPreLoad.py then RegionJobPreLoad.py then the JobPreLoad.py for the plugin, each of which would be optional.

The one downside of this approach is that, with so many scripts loading, it can be hard to troubleshoot script issues.

Regarding debugging. If a debug message is printed to the logs then it should help to see where a script starts and stops
e.g.

– Loading GlobalPreLoad.py

– Skipping missing RegionPreLoad.py

– Loading JobPreLoad.py

Hello,

I wanted to just give you a heads up that this is on our wishlist, but likely won’t make it in until Deadline 8 or later.