Return codes list

Hi there,

My studio is using the command line interface to dispatch our deadline tasks to the farm. However we have been getting a failed connection error randomly that is causing our pipeline apps to fail. Usually dispatching again fixes the error, so we need to let the artists know.
We are struggling to reproduce this error as it is totally random. As we are launching this in a subprocess, we are able to get the return code. Problem is, we aren’t sure what return code we are looking for. Logging this isn’t really an option as we don’t know when it will next happen and users often don’t send us logs.
I’m unable to find this information in the documentation, so is it possible to get a list of the return codes please? This may be handy for other users too
Thanks

I just ran a quick test now, in case it helps you on your way:

  1. Successful submission = exit code 0
  2. Invalid job file submission = exit code 1
  3. Non-existent repository = exit code 1
  4. Stopped MongoDb service = exit code 1

If you’re hunting for a connection-failed type error, I believe my last test includes that scenario.

Possibly worth noting that in each case, the stdErr pipe came back empty. All communication happened on stdOut.

2 Likes

The exit code won’t give you enough information about what went wrong, as Daniel showed.

I think there are DeadlineClient functions to also read the stdout properly, though I haven’t used them yet. For example ExecuteCommandAndGetOutput:
https://docs.thinkboxsoftware.com/products/deadline/10.1/2_Scripting%20Reference/class_deadline_1_1_scripting_1_1_client_utils.html#a510b7c5aa1cdb7fadceb769477ea0d20

This would still require you to interpret the response text as needed.

1 Like

Thanks for this. Useful to know. Shame about the stderr not getting used. I’m parsing the output to get the right exception, so I’ll keep doing that.

This is good to know, but we aren’t using the scripting api for some reason (decision made before I joined). Maybe I can sway the team, but for now parsing is the way to go. Thanks