App::MadEye::Plugin::Agent::Sleep - every time timeout


App-MadEye documentation Contained in the App-MadEye distribution.

Index


Code Index:

NAME

Top

App::MadEye::Plugin::Agent::Sleep - every time timeout

DESCRIPTION

Top

THIS MODULE IS ONLY FOR DEBUGGING.

SCHEMA

Top

    type: map
    mapping:
        target:
            type: seq
            required: yes
            sequence:
                - type: str
        sleep:
            required: yes
            type: int

AUTHORS

Top

Tokuhiro Matsuno

SEE ALSO

Top

App::MadEye


App-MadEye documentation Contained in the App-MadEye distribution.

package App::MadEye::Plugin::Agent::Sleep;
use strict;
use warnings;
use App::MadEye::Plugin::Agent::Base;

sub is_dead {
    my ($self, $host) = @_;

    my $conf = $self->config->{config};
    my $sleep           = $conf->{sleep} or die "missing sleep";

    sleep $sleep;

    return;
}

1;

__END__