Author Topic: callback/dependency between an individual job work items  (Read 3030 times)

vicken

  • Jr. Member
  • **
  • Posts: 8
callback/dependency between an individual job work items
« on: December 14, 2015, 04:55:22 PM »
Ehh whats up. I'd like to send a job such that the first agenda item runs before the rest (it's writing out files/doing prep work to be used by the remaining "real work items").

I have been trying something to the affect of the following code below. the individual agenda items are blocked as i expect, but something is wrong with my callback trigger, so the remaining work/agenda items don't unblock.

work_items  = qb.genframes('pre, 1-10')

# block all frames except for "pre"
for w in work_items:
    if w['name'] != 'pre':
        w['status'] = 'blocked'

job = qb.Job()
# job setup
...
...

# im really not sure of the correct syntax here, especially of the code string.
job['callbacks'] = [{'triggers':'done-work-self-pre', 'language':'qube':, 'code':'unblock-work-self-*'}]

I suspect i may be missing somethign obvious entirely. thanks!

jburk

  • Administrator
  • *****
  • Posts: 493
Re: callback/dependency between an individual job work items
« Reply #1 on: December 22, 2015, 07:53:19 PM »
Think it's tripping up on the "*" in the code, I don't the qube callback language can access individual agenda items.

Don't bother unblocking all the rest of the frames, unblock the entire job:

Code: [Select]
cb = {
    'triggers': 'complete-job-preFlight',
    'language': 'qube',
    'code': 'unblock-self'
}