First, just a disclaimer that this isn’t supported. We make no guarantees that the database structure won’t change in the future, which is why we always recommend using deadlinecommand to get this information. Now, with that out of the way…
When you installed the Deadline 6 Repository, you were asked to specify a database name for your MongoDB database (ie: deadline6db). This is the name of the database that all the Deadline collections will be in. You can run the mongo.exe command line application on the machine the database is on to explore the contents. Once mongo.exe is running, do this to show the database name(s):
show dbs
Then do this to explore a specific database (make sure to specify the name of the deadline 6 database here):
use deadline6db
Then you can run this to view all the Deadline collections:
show collections
The collection that stores the jobs is the “Jobs” collection. Each job will have an _id property that you can use to query for a specific job, and a Stat field that stores the status. Now the status is just an integer:
I understand that and I am aware of the risk. Thank you very much for the code examples, I’ll forward it to the programmers doing the dirty work
We opted for the direct db access as that seems to be the fastest way to get the data we need.
deadlinecommand is great, but querying it often has proven to be problematic (hangs from time to time) and mainly very, painfully, slow what we need it for.
I should mention that for 6.1, we will be looking at starting a native Python module for direct Deadline access that should allow you to avoid deadlinecommand for a more direct approach.
Just thought I’d mention that I’ve opted for a similar approach. As mentioned, deadlinecommand is pretty slow (especially when it needs to be called many times for a given operation), and the output can be inconsistent depending on what type of command is being run. Basically, the amount of overhead and housekeeping necessary to call out and reliably parse its output on a situation-by-situation basis means it isn’t worth the trouble. Obviously there are some things that are still simpler to do using deadlinecommand (job submission, for example), but for a lot of job/task manipulation, data gathering, and housekeeping, an object-oriented layer built on pymongo is much more intuitive.