Author Topic: Job dependency (perhaps buggy)  (Read 3071 times)


  • Jr. Member
  • **
  • Posts: 4
Job dependency (perhaps buggy)
« on: February 04, 2011, 12:45:27 PM »
I've been testing out Job Dependency and I can't get a 2nd job to start if the job it's dependent upon is already complete at the time of the 2nd submission.

What I want is:
1. Render image sequence through 3d app
2. When #1 is complete, make an image sequence through rvio

The above works as long as #2 is submitted before #1 is complete. However, if #2 is submitted after #1 is already complete, then #2 remains blocked indefinitely.

I've done my tests with the xsi (#1) and rv (#2) job in Qube 6.0.0

Does anyone have an idea of what a good solution would be to make the above work?

There must be a point where Qube sets the state of the submitted job to 'blocked' after it checks the state of the dependant jobs. If we have access to this code a simple modification could be a fix. I suppose the long way would be to create a custom job type where the backend script could handle this check.

TIA for any help.


  • Administrator
  • *****
  • Posts: 493
Re: Job dependency (perhaps buggy)
« Reply #1 on: February 06, 2011, 05:06:13 AM »
The callback system is event driven, so if the triggering event  has already happened before the dependent job is submitted, the callback will never be triggered.

Are you building your jobs with the api?  Then it's easy:

You need to submit both jobs at the same time so they belong to the same pgrp.  Read the "callbacks" section in the Developement.pdf guide, and pay attention to job "labels".  When you submit multiple jobs in the same operation, they belong to the same 'pgrp', and any job in a pgrp can reference other jobs in the same pgrp by label; you don't need the jobid.  Labels are scoped within a prgrp; they only have to be unique within a pgrp, so you can use the same simple label (like "render") over and over in different pgrp's.

Build the first job, assign it's 'label' attribute a name of some some, a single simple word (no spaces, punctation,  etc.).  keep it simple but descriptive, say

Code: [Select]
renderJob['label'] = 'render'
the rvio job should have a dependency that looks like:

Code: [Select]
rvioJob['dependency'] = 'link-complete-job-render'
Thens submit the jobs in a single list:

Code: [Select]
qb.submit([renderJob, rvioJob])
You're now guaranteed that the first job won't be complete before the second job is submitted.

The "link-complete-job" syntax means that the rvio job won't start until the ~entire~ render is complete.  If you would like each frame's rvio comp to run when the corresponding frame's render is complete, change the dependency to look like:

Code: [Select]
rvioJob['dependency'] = 'link-complete-work-render'
« Last Edit: February 06, 2011, 05:08:15 AM by jburk »


  • Jr. Member
  • **
  • Posts: 4
Re: Job dependency (perhaps buggy)
« Reply #2 on: February 07, 2011, 01:08:59 PM »
Thanks for the detailed reply.

Normally, we do send both the image render and movie creator job at the same time, in which case dependencies work as expected. There have been rare cases where we want the movie creator job to execute well after the image render job has finished. I'll just create a custom job type to handle creating movies from finished render sequences.

Thanks again.