AWS Thinkbox Discussion Forums

Deadline 6 Beta - customize command-line tool output?

Hello,

Quick question regarding the Deadline 6 Beta command-line tool. Is there a way to customize the output that is piped to stdout, when submitting a new job to the Deadline render queue?

i.e. from the command shell:

%> deadlinecommand “/blah/some_info.job” “/blah/some_job.job”
Deadline Command 6.0 [v6.0.0.50272 R]

Submitting to Repository: \xyz\deadline

Submission Contains the Following:

  1. Auxiliary File #1 ("/blah/some_job.job")

Result=Success
JobID=512d19d6dddf7411e4313713

The job was submitted successfully.

… Can we instruct the command tool to print only the line for the “JobID”, and nothing else? I will require this value later on for some custom post-job processing.

Thanks lots!

Parmjit V.
Software Developer

No, there currently isn’t a way to customize the output. However, you should still be able to parse the Job ID from that output string. You can read all the stdout from the subprocess you launch using the “read()” function, and then split that string into an array of lines. Then just loop through each line until you find the one that starts with JobID= and get the ID as a substring of that line.

You can take a look in \your\repository\Nuke\Main\SubmitNukeToDeadline.py for some helpful code. The CallDeadlineCommand command shows how we call deadlinecommand and get its output as a single string. Later on in the script, we use deadlinecommand to get a list of pools. Since deadlinecommand dumps them out as one pool per line, we can do this:

output = CallDeadlineCommand( ["-pools",] )
pools = output.splitlines()

In this case, ‘pools’ ends up being the array of pools.

Hope that helps!

  • Ryan

… Yes, very helpful indeed. Thank you!

Parmjit

Privacy | Site terms | Cookie preferences