[Deadline scripting] - Accessing Slave Properties

Discussion and Support of Deadline, the Render Management System
eamsler
Posts: 1665
Joined: Thu Dec 16, 2010 1:02 pm
Location: Winnipeg, MB, Canada

Re: [Deadline scripting] - Accessing Slave Properties

Postby eamsler » Tue May 16, 2017 1:39 pm

Example?:
https://github.com/ThinkboxSoftware/Dea ... utoconf.py

Now, to pre-pop those params, you need to create a SlaveSettings object with the assumed name of the Slave that'll come up. We do this with the SPOT plugin in 9 and the Balancer (using the core APIs). They'll show up in the Monitor in a blue colour since it's missing the missing the matching SlaveInfo object.
Edwin Amsler
Head of Support
Thinkbox Software Inc
+1-866-419-0283 ext 804

Winnipeg

Berkyjay
Posts: 525
Joined: Mon Jul 29, 2013 3:14 pm

Re: [Deadline scripting] - Accessing Slave Properties

Postby Berkyjay » Tue May 16, 2017 3:21 pm

eamsler wrote:Example?:
https://github.com/ThinkboxSoftware/Dea ... utoconf.py

Now, to pre-pop those params, you need to create a SlaveSettings object with the assumed name of the Slave that'll come up. We do this with the SPOT plugin in 9 and the Balancer (using the core APIs). They'll show up in the Monitor in a blue colour since it's missing the missing the matching SlaveInfo object.


I'll admit that I'm unsure how to go about that Edwin. Could you give me a bit more guidance? I can see how to go about setting the params for existing slaves. But I also see what you mean how it takes some time to initialize the new slave instances.
James Berkheimer
Technical Director
Viscira

eamsler
Posts: 1665
Joined: Thu Dec 16, 2010 1:02 pm
Location: Winnipeg, MB, Canada

Re: [Deadline scripting] - Accessing Slave Properties

Postby eamsler » Wed May 17, 2017 10:14 am

Ah, so the trick here is that if the SlaveSettings object doesn't exist yet, the GetSlaveSettings() will return a new empty object that you can populate with whatever you want. As long as you properly predict what the new Slave will be named (including suffix), you should be able to pre-define its information.

Here's another example that I should have pointed you to first, since this doesn't even require the Slave to be starting up:
https://github.com/ThinkboxSoftware/Dea ... rideIPs.py

If you run that script, you'll get three brand-new blue Slaves with those names in your Slave list in the Monitor.
Edwin Amsler
Head of Support
Thinkbox Software Inc
+1-866-419-0283 ext 804

Winnipeg

Berkyjay
Posts: 525
Joined: Mon Jul 29, 2013 3:14 pm

Re: [Deadline scripting] - Accessing Slave Properties

Postby Berkyjay » Wed May 17, 2017 12:29 pm

Great! Thanks all for the help. I'd like to share the fruits of my labor since I feel this was a community effort. :)

Our Bitbucket repositories are private so I can't share that. But I've attached the script to this post.

Cheers!
Attachments
InstanceManager.rar
(1.49 KiB) Downloaded 4 times
James Berkheimer
Technical Director
Viscira


Return to “Thinkbox Software - Deadline”

Who is online

Users browsing this forum: No registered users and 1 guest