<<

NAME

Inca::ReporterManager::Scheduler::Sequential - Executes reporter in sequence

SYNOPSIS

  use Inca::ReporterManager::Scheduler::Sequential;
  use Inca::ReporterManager::ReporterCache;
  use Cwd;
  use File::Spec;

  my $file_depot = "file://" . File::Spec->catfile(getcwd(), "depot.$$");
  my $sched = new Inca::ReporterManager::Scheduler::Sequential( 
                    1,
                    [ $file_depot ],
                    "resourceA",
                    new Inca::ReporterManager::ReporterCache( 't'),
                    undef, 
                    undef );
  my $sc = new Inca::Config::Suite::SeriesConfig();
  $sc->setName( "echo_report" );
  $sc->setVersion( "1" );
  $sc->setPath( getcwd() . "/t/echo_report" );
  $sc->setContext( "echo_report" );
  $sched->submit( 'add', undef, $sc );

A scheduler for the reporter manager which executes reporters sequentially. The scheduler is forked for each start request. It does not take any additional configuration parameters.

CLASS METHODS

new( $args, $check_period, $credentials, $depots, $depot_timeout, $reporter_cache, $rim_path, $tmpdir )

Class constructor which returns a new Inca::ReporterManager::Scheduler::Cron object. The constructor must be called with the following arguments.

Arguments:

args

A reference to a hash array containing the schedulers configuration inforamtion

check_period

A positive integer indicating the period in seconds of which to check the reporter for exceeding resource limits.

credentials

A reference to a hash array containing the credential information.

depots

A reference to an array of depot uris. The report will be sent to the first depot in the list. If the first depot is unreachable, the next depots in the list will be tried.

depot_timeout

A positive integer indicating the period in seconds of which to time out a send of a report to the depot.

reporter_cache

An object of type Inca::ReporterManager::ReporterCache which is used to map reporter uris to a local path.

rim_path

A string containing the path to the reporter-instance-manager program. =item tmpdir

A string containing a path to a temporary file space that Inca can use while executing reporters

start( )

Start the sequential scheduler.

Returns:

Returns true if there were no errors starting the scheduler; returns false otherwise.

submit( $action, $scheduler_args, @reporters )

Accepts an action (currently only 'add') and any number of reporters. These reporters will then be executed in a sequential order.

Arguments:

action

A string containing an action (e.g., add, delete) pertaining to the group of reporters.

scheduler_args

A reference to a hash array of arguments for the scheduler

configs

An array of Inca::Config::Suite::SeriesConfig objects.

Returns:

Returns true if at least one reporter is executed; otherwise returns false.

AUTHOR

Shava Smallen <ssmallen@sdsc.edu>

CAVEATS/WARNINGS

No known problems.

SEE ALSO

Inca::ReporterManager::Scheduler

<<