Hi!
I have a job that needs to wait for multiple callbacks to get triggered before unblocking itself. Specifically, I needs frames of job C to be unlocked when:
- job A is done (complete-job-A)
- the corresponding frame of job B is done (complete-work-B-22)
I currently have two callbacks associated with the agenda of job C:
# For the job-on-job dependency
callback['triggers'] = 'complete-job-A'
callback['language'] = 'qube'
callback['code'] = 'unblock-self'
# For the frame-on-frame dependency:
for agendaItem in agenda:
agendaItemName = agendaItem['name']
agendaItemCallback['triggers'] = 'complete-work-B-%s' % (agendaItemName)
agendaItemCallback['language'] = 'python'
agendaItemCallback['code'] = 'import qb'
agendaItemCallback['code'] += '%s%s%s' % ('\nqb.workunblock(\'%s:', agendaItemName, '\' % qb.jobid())')
agendaItemCallback['code'] += '\nqb.unblock(qb.jobid())'
Obviously, the frames get unlocked when either of the callbacks get triggered: what's the proper way to have frames unlock only after BOTH triggers have been emitted?
Thanks!