刘刊 > pantheon-0.58 > Argos::Ctrl

Download:
pantheon-0.58.tar.gz

Dependencies

Annotate this POD

View/Report Bugs
Source  

NAME ^

Argos::Ctrl - Controls Argos via a SQLite database

SYNOPSIS ^

 use Argos::Ctrl;

 my $ctrl = Argos::Ctrl->new( '/sqlite/file' );

 $ctrl->pause( $watcher, $time, $info );
 $ctrl->exclude( $node, $time, $info );

 my %xcldd = map { $_ => 1 } @{ $ctrl->excluded() };
 sleep 3 if $ctrl->stuck( $watcher );

DATABASE ^

A SQLITE db has a argos table of four columns:

 ctrl : 'pause' or 'exclude'
 node : watcher name or node name
 time : time to expire
 info : additional information, if any

METHODS ^

pause( $watcher, $time, $info )

Pause $watcher for $time seconds.

stuck( @watcher )

Return records that cause @watcher to be stuck. Return all records if @watcher is not defined.

exclude( $node, $time, $info )

Exclude $node for $time seconds.

excluded()

Return ARRAY ref of excluded nodes.

clear( $ctrl => @target )

Undo $ctrl for @target, where $ctrl may be pause or exclude

syntax highlighting: