DeadlineEvent / Python Bug - RepositoryUtils.SetJobFrameRange Pends the jobs if job was FrameDependent

OK now this bug is quite specific and technical.

Deadline Version: 10.1.4.1
We are planning to update soon, but just wanted to know if this is still an issue.

Context:
I have a very simple Event that modify the frame range of a job when submitted.

Problem:
But for some reason, when I change the frame range using RepositoryUtils.SetJobFrameRange The job goes to “Pending”.

I’m like ok this is a bug, I can check the Status after changing the frame range in the Event and if it’s “Pending”, release it! But no, if I do job.JobStatus after changing the frame range, it says the status is still “Active” (Which is Queued.)…?? But in reality it’s “Pending”. (This is another bug!)

What cause the problem:
So I found out if the job is submitted as “Frame Dependent” (which is by default in Houdini for example) and you wanna change the frame range using RepositoryUtils.SetJobFrameRange, the problem occurs! The job before the Event was “Queued” and not “Pending”.

Expected behavior:
If you change the frame range of a job in Python, the Job Status should be:

  • Queued if was Rendering/Queued
  • Suspended if was Suspended
  • Pending if was Pending
  • Failed if was Failed
    You know the drill :stuck_out_tongue:

TD;DR: Using Python in an Event, If a job is “Queued” and “FrameDependent” is activated, when you change it’s frame range in Python, the job goes to “Pending” even if it was “Queued” in the first place.

When you’re checking the job’s status, are you getting a new instance of the Job object with GetJob, or are you reading the status from the and Job object you had before?

It’s possible you’re seeing the old status when you’re getting Active back from JobStatus.

What callback is this event triggering on? I’d like to take a look at it if there’s nothing you need to keep secret in there.

It’s an Event using OnJobSubmitted.
For now I have a workaround of disabling FrameDependancies, change frame range, then put back frame dependencies.

I’ll take some time during this week to answer your question about the GetJob, but it’s not fetching any other job than the one given by the event… That would be a problem tho. I’ll be happy to share my Event as well if you wanna take a look.

Sure, I can take a quick peek!

I’d expect you need to:

  1. Edit Frame range + save the job
  2. Run GetJob to get the updated job from the database
  3. Get the Job status, which should be correct now