Icon

This is the documentation for an older version of Qube. The latest version of the documentation can be found here: Qube

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Callbacks are defined as a list of one or more key/value pairs which is appended to the job's callback list.

Python API Examples

...

JobB waits for the entire jobA to complete

Code Block
titleUsing the "qube" callback language
linenumberstrue
languagepython
frameRange = '1-10'
 
jobA = {
	'name': 'my ribgen job',
	'label': 'ribgenLabel',
	'prototype': 'cmdline',
	'package': {
		'cmdline': 'my ribgen command...'
	},
	'agenda': qb.genframes(frameRange),
}

jobB = {
	'name': 'my render job',
	'label': 'render',
	'status': 'blocked',
	'prototype': 'cmdline',
	'package': {
		'cmdline': 'my render command...'
	},
	'agenda': qb.genframes(frameRange),
}
 
callbacks = [
	{ 
		'triggers': 'complete-job-ribgenLabel',
		'language': 'qube',
		'code': 'unblock-self'
	}
]
 
jobB['callbacks'] = callbacks
 
qb.submit( [jobA, jobB] )

 

...

Code Block
titleUsing the "python" callback language is identical to the first example, except the callback's "language" and "code" is different
linenumberstrue
languagepython
frameRange = '1-10'
 
jobA = {
	'name': 'my ribgen job',
	'label': 'ribgenLabel',
	'prototype': 'cmdline',
	'package': {
		'cmdline': 'my ribgen command...'
	},
	'agenda': qb.genframes(frameRange),
}

jobB = {
	'name': 'my render job',
	'label': 'render',
	'status': 'blocked',
	'prototype': 'cmdline',
	'package': {
		'cmdline': 'my render command...'
	},
	'agenda': qb.genframes(frameRange),
}

callbacks = [
	{ 
		'triggers': 'complete-job-ribgenLabel',
		'language': 'qube',
		'code': 'unblock-self'
	}
]

jobB['callbacks'] = callbacks
 
qb.submit( [jobA, jobB] )