You are viewing an old version of this page. View the current version.

    Compare with Current View Page History

    « Previous Version 9 Next »

    Overview

    Universal callbacks are operations which are automatically attached to every job that is submitted. These are installed by a site administrator either on the Supervisor's local disk or on a file system which is accessible by the supervisor service.

    Setting Up Universal Callbacks

    To set up Universal Callbacks, the site administrator needs to make a directory (default $QBDIR/callback) and create a text-based configuration file, called "callbacks.conf" in that directory.

    Further, in the same directory, files containing the implementation (aka "code") of each Universal Callback must also be installed.

    The callbacks.conf file serves as a map that tells the system which callback code should be triggered to run on what events.

    The "callbacks.conf" file

    The callbacks.conf file is a text file, much like qb.conf, containing one or more lines with a "key = value" pair, associating each implementation file to a trigger event. The syntax is:

    The filename points to a file in the same directory that implements the callback code. Note that Universal Callbacks support Python, Perl, and Qube callbacks, and the filename must have the extension .py, .pl, or .qcb, respectively.

    The trigger specifies the triggering event that activates the callback, described in details at Triggers

    Here's an example:

    In this example, there are presumably 4 implementation files in the callback directory, logFailuresToDB.py, mail-status.qcb, submitted.py, and checkWork.pl, that have the implementation code in them.

    submitted.py

    Unable to render {include} The included page could not be found.

    qb.conf Parameters

    supervisor_universal_callback_path

    • Path to the directory where Universal Callbacks (the callbacks.conf file and the implementation files) are found
    • May be a comma-separated list to specify multiple locations
    • default: $QBDIR/callback

     

     

    • No labels