AWS Thinkbox Discussion Forums

How to manually grab job reports using job ID

Avoiding all Deadline API calls due to limitations, currently working directly with the deadline mongo DB and able to almost get all the information I need, just missing this one last piece of the puzzle.

From what I understand the logs are held here:
\reports\jobs\fe\0\65eae12786a94190d0227fe0

How can I use the id to get to the bz2 and how do I process them? Thanks in advance!

Figured it out!

   jobId = self.taskTable.table.item(selectedRow, 1).text()
   reportId = self.taskTable.table.item(selectedRow, 0).text()

        # Construct the log path
   reportLog = f"{self.env.DEADLINE_REPO}/reports/jobs/{jobId[-3:-1]}/{jobId[-1]}/{jobId}/{reportId}.bz2"

It’s’ just a deconstruction and reconstruction with the job id and report id

Just out of my own curiosity, what’s the limitation that has you avoiding the APIs? Assuming that doesn’t need a short novel of context first. :slight_smile:

1 Like

No huge novel for context thankfully, I love ya’ll’s API. Mainly I’ve found deadlinecommand + executescript to be far superior and convenient than the REST API (I’m 95% certain there’s lots of limitations on the REST API) but the Scripting API still has caused issues integrating it into our pipeline, as the needs the .exe to be executing the code. Also I found that querying the Mongo DB is infinitely faster and we can just parse the dicts into Pydantic models for ease-of-use!

The scripting API is still king when it comes to actually interacting with the DB though, but for providing a more curated view of the farm data for artists, the MongoDB route is most practical.

Gotcha, that makes sense. I must warn you that hitting the database isn’t supported, and we don’t announce schema changes or support issues that come from those changes.

So long as you’ve got robust error handling in your calls you should be safe.

1 Like
Privacy | Site terms | Cookie preferences