I was just wondering if someone knew how to get the Job Statistics through Python API?
For example…
Average Ram usage.
Average task time.
Estimate time remaining.
I have been through the “Deadline-6.2.1-Standalone-Python-Reference.pdf” and cant find any information to get these results.
Is it possible to get this info through the Standalone Python API?
As far as I am told, this is possible, you would look in job object portion of the scripting docs. If you aren’t sure what you’re looking for, please advise and I can have one of our coders look it up for you.
Thanks for letting me know this isn’t in the Deadline API.
What would be the best way to use Python API to call a script running though deadline (…/DeadlineCommand.exe -ExecuteScript “/path/to/script.py”) then grab the results and print them in python API is this possible?
Hi Chris,
Exactly, execute the script just like you describe and my example script above shows how you can return the information your after.
For other values, see our API: docs.thinkboxsoftware.com/produc … entry.html
EDIT: Sorry sir, misread your post. I think your asking how to spawn the actual DeadlineCommand.exe process. I would use subprocess: docs.python.org/2/library/subprocess.html
I will check this out as soon as i get a moment to see if it works.
When running your script its coming up with an error…
An error occurred while executing script “RNDeadline.py” for the Pulse WebService:
Python Error: InvalidOperationException : can not create two instances of DeadlineApplicationManager
at Deadline.Monitor.MonitorManager…ctor()
at Deadline.Scripting.JobUtils.CalculateJobStatistics(Job job, TaskCollection taskCollection) (Python.Runtime.PythonException)
Stack Trace:
[’ File “none”, line 32, in main\n’]
The upgrade to 7.1 was a bit of a pain I’m sure there is better ways of updating the software than the route I took.
But looks like everything is working so far Including your code…