Provided by: sreview-master_0.5.0-1_all bug

NAME

       sreview-dispatch - Watch the database for talks that need work done, and schedule jobs for
       them

SYNOPSIS

       sreview-dispatch

DESCRITPION

       sreview-dispatch is the central script for SReview. It can be used in two ways:

       1.  Either you run it with an external scheduler (e.g., gridengine, slurm, PBS, torque).
           This is the recommended way of using SReview for large installations. In this mode of
           operation, "sreview-dispatch" should be run once in the entire network, and the
           "query_limit" configuration value should be set to 0.

       2.  Or you run it with no external scheduler. This is the default. In this mode of
           operation, it is recommended that the "query_limit" configuration parameter is set to
           a nonzero value, so that individual "sreview-dispatch" instances do not take all the
           work, keeping all the other instances idle. In this mode of operation, one
           "sreview-dispatch" instance should be run per CPU core on every machine that is used
           for performing work.

           This mode works, but using an external scheduler allows for operating more flexibly on
           pending jobs, and on the addition or removal of extra nodes.

OPTIONS

       None. "sreview-dispatch" uses the system-wide SReview configuration.  For more
       information, see sreview-config

CONFIGURATION

       "sreview-dispatch" considers the following configuration values:

       dbistring
           The database connection string

       state_actions
           A hash table of shell commands to execute when a talk is found in a particular state
           with the "waiting" progress value. The hash key should be the state name.

           If a state is not specified in the "state_actions" hash, then "sreview-dispatch" will
           ignore that state. This allows for handling particular states on particular hosts, if
           necessary.

           The shell commands can use the following template variables:

           <%== $talkid %>
               The database ID of the talk to work on

           <%== $output_dir %>
               The value of the "script_output" configuration item, i.e., where to redirect
               output to.

       query_limit
           The maximum number of requests that should be handled per loop. Should be set to 0
           (meaning infinity) when using an external scheduler; should probably be set to 1 when
           not.

       event
           The event in use for this instance of SReview. In previous versions of SReview, the
           dispatcher would run things for every event in the database; since version 0.4 this is
           no longer the case. This allows multiple instances of SReview to exist on the same
           host, sharing the same database if wanted.

       script_output
           The location where stderr and stdout output should be written to. This is supposed to
           be a directory; it is reasonable to create a file for stderr and a file for stdout for
           each script run.

BUGS

       "sreview-dispatch" currently polls the database every 10 seconds. This should be changed
       to an event-based system based on PostgreSQL asynchronous notifications.