Hi there, I’m the Python developer at Cartoon Saloon and I’m currently working on a way to have a script triggered by something send a few commands to DeadlineCommand to requeue a new version of a job.
The important thing I need to be able to do is find the job, modify some of the ExtraInfo it contains (just version number and version id) and then requeue it.
I know how to do all the steps but I don’t know how to refer to the specific attributes I want to modify. I know I can do this:
deadlinecommand -setjobsetting #JOB ID# name new_name
I know how to target the extra info slots that jobs contain, but what’s a problem is that I need to target one of the key=value pair, and haven’t found a way I can get the command recognised.
So I tried a few formats like
deadlinecommand -setjobsetting #JOB ID# extrainfokeyvalue1 version 2
deadlinecommand -setjobsetting #JOB ID# extrainfokey1 version 2
deadlinecommand -setjobsetting #JOB ID# extrainfovalue1 version 2
But I just get “setting not found” every time. Is there anywhere I could get a thorough list of info about this? I found this page for job info scripts and that helped me get most things, but the Key Value pair names don’t track to deadline command.
Anyone got any ideas about either documentation for this or even just an answer to the specific thing I’m looking for?
Hi Gary,
Just double-checking but that link you posted is for v5.2 of Deadline and I’ assuming you guys are probably on v7.x?
Here’s the syntax for what your trying to do, I think it’s the character between the word: “version” and “2”, which is causing the issue here and needs to be encapsulated in quotation marks.
and don’t forget the Scripting API docs & RESTful API docs are both here to help as well (especially if your wanting to execute python script inside of Deadline instead of using the external deadlinecommand.exe tool)
Yeah we’re on Deadline 7. I had both versions from the documentation open and pasted in the wrong one.
What you’ve posted does work but it sets the Extra Info parameters, not the Info Key/Value Pairs I’m looking to adjust. I have a screenshot to show exactly what I’m trying to access.
which seems like a good fit but I’m not sure how to feed that to DeadlineCommand since every other attribute I’ve used is set with the format SetJobSetting above.
Hi Gary,
I had to double-check, but it seems we don’t currently support setting the ExtraInfoKeyValue pairs via the command line, but as you’ve already discovered, it is possible via the Script API, where it could be executed via a Python script which in turn could be executed via “deadlinecommand -ExecuteScript yourScript.py”
I will ask to have this added to our wish-list for a future version.
Mike
Ok Mike, thanks. We were ideally going to skip having to set up Pulse for that but we can go down that road.
Also one last thing I noticed, it seemed like I couldn’t overwrite the Extra Info variables in the command line. It seemed like it allowed empty ones to be set but once they had a value I couldn’t change them at all. Do you know if this is something that would also come up when interacting through the API? Just wondering if we’ll need to work around it on those.
I don’t fully understand your intent at the beginning of your first post (so might be wrong here…), but if you need the ExtraInfoKeyValue pairs to be updated when a job is submitted or de-queued, then an event plugin would be able to do this, which uses our standard script API built-in to Deadline and there will be no requirement on running Pulse or it’s RESTful web service.
I just had a play with the command line and the following worked just fine for me in v7.0.2.2, after each command, I checked via the Monitor and the value was as intended:
Ah, you’re right it is working now. I’m not sure why it didn’t seem to be before because DeadlineCommand did register the inputs as if they were working but they never changed.
To fully explain the intent. We’re using Shotgun on our production, and shotgun offers a system that will trigger scripts based on events that happen in your project.
In our case, we’re investigating the idea of being able to create a new version of a shot and have a script runs that automatically finds the job that created the old version of the shot, adjusts the version information and then requeues the existing job. From my reading of the documentation, it seemed like I’d need Pulse to be listening out for a trigger such as this, since it’s something else entirely launching the scripts rather than a process triggering it inside Deadline.
IIRC Shotgun has it’s own events server/daemon which I’m assuming is what your referring to here? If so, then this could be used to trigger the execution of a python script which would just need to be passed as an argument to the ./deadlinecommand binary executable. As a python script being executed within the Deadline environment, it would then be able to access the job objects and their properties, control jobs, etc. No need for Pulse or our web-service here. Alternatively, you could use the RESTful API via Pulse but this would take more effort to handle the returned json object(s) and this API is not 100% feature rich like our main script API, which has a function for pretty much everything under the sun! As long as your happy to install the deadline client software on the same machine running the Shotgun events daemon server, then you should be good to go.
Yes, the Deamon’s exactly what I’m talking about. I have a much better idea of how to do it now.
I was thinking that it was necessary to send the information to Deadline from the Daemon triggered script, but now of course I see what you’re saying. That script could just trigger a script within Deadline which pulls the information down from Shotgun. It feels less intuitive but functionally makes more sense and we can work with this way much easier.
FYI. Support via ./deadlinecommand to get/set the ExtraInfoKeyValue pairs has now been added and will be available in Deadline v7.1 beta 2. Email beta [at] thinkboxsoftware [dot] com for early access.
Thanks for the heads up Mike!
We’ve got it working without that for now at least and we’re ideally not going to use beta during production but I’ll keep it in mind for future.