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.

A callback is Qube's mechanism to allow custom execution of queuing logic depending upon the events which occur during the lifetime of a Qube job or upon pre-defined system events.
The use of callbacks can range from sending email when a job has completed, to designing complex dependency trees or direct integration with an asset tracking system.
When specifying a callback, Qube requires a little information in order to execute it properly. This includes:

  1. The trigger expression to specify when the callback should be executed.
  2. The scripting language to use for the callback.
  3. The trigger expression to specify when the callback should be executed.

Children Display

  1. action or code the callback will execute each time the trigger condition is met

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 jobA

Code Block
titleUsing the "qube" callback language
linenumberstrue
languagepython
jobA = {
	'name': 'my ribgen job',
	'label': 'ribgenLabel',
	'prototype': 'cmdline',
	'package': {
		'cmdline': 'my ribgen command...'
	}
}

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