NAME

MYDan::Deploy::Ctrl - Controls maintenance via a SQLite database

SYNOPSIS

use MYDan::Deploy::Ctrl;

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

$ctrl->clear();
$ctrl->pause();
$ctrl->resume();
$ctrl->exclude();
sleep 3 if $ctrl->stuck();

DATABASE

A SQLITE db has a watcher table of four columns:

name : name of maintenance
ctrl : 'error', 'pause' or 'exclude'
node : stage name or node name
info : additional information, if any

METHODS

pause( $job, $stage, $stop, $ctrl = 'pause' )

Insert a record that cause stuck.

stuck( name, step )

Return records that cause @stage to be stuck. Return all records if @stage is not defined. stuck( ) stuck( name ) stuck( name, step )

resume( name, step )

Clear records that cause @stage to be stuck. Clear all records if @stage is not defined.

exclude( $node, $info )

Exclude $node with a $info.

excluded()

Return ARRAY ref of excluded nodes.

dump()

Return ARRAY ref of *.

clear()

clear all records.