Is it possible to prioritise multiple workers on the same machine that are attached to different deadline repositories?
Say WorkerRepoB is rendering on the machine, but WorkerRepoA gets a priority job from a different repo and starts up. Can WorkerRepoB be told to cancel whilst WorkerRepoA is rendering?
Thanks
Not easily, and I’m curious about the problem you’re trying to solve.
To do it you’d have to have to run each Worker as a different user on the machine and use the client configuration to point to each repository.
From there you could use an event plugin hooked into OnSlaveRenderingCallback to send a stop command to the matching Worker.
Hi Justin,
I basically want to share a machine that is part of 2 repos. One of the repos won’t be that busy, so the machine could help out on the other repo when idle. When a critical job comes in, it will dump what it is doing on the other repo and start the critical job.
If that makes sense!
Yep that makes sense! Deadline’s got zero tools to make it easy for you though. The way that workflow is supported with a single-repository setup is by setting all jobs to be interruptable and using pools to say that one group of jobs are more important than another. The assumption being that there’d be a single farm per company.
I think the plan I outlined above is still the best starting framework, with a couple tweaks:
-
Instead of having multiple Workers under multiple users, make the swap by stopping the deadlineworker, calling ChangeRepository and starting the Worker again.
-
Use an OnJobSubmitted event instead of OnSlaveRendering. That way the changeover will happen when the job is added to the farm.
The trouble is knowing when to switch back to the low priority farm. There’s code for ‘time since rendering’ in DeadlineRepository10\events\Spot\Spot.py you could grab.