Changeset 8016 for lang/perl/App-MadEye
- Timestamp:
- 03/17/08 11:57:59 (8 months ago)
- Files:
-
- 1 modified
Legend:
- Unmodified
- Added
- Removed
-
lang/perl/App-MadEye/trunk/lib/App/MadEye/Plugin/Worker/Simple.pm
r7560 r8016 2 2 use strict; 3 3 use warnings; 4 use base qw/ Class::Component::Plugin/;4 use base qw/App::MadEye::Plugin::Base/; 5 5 use App::MadEye::Util; 6 6 use Params::Validate; 7 8 our $TIMEOUT = 60; # TODO: configurable9 7 10 8 sub run_job :Method { … … 13 11 $context->log( debug => "watching $args->{target} by $args->{plugin}" ); 14 12 15 timeout $TIMEOUT, "watching $args->{target} $args->{plugin}", sub { 13 my $timeout = $self->config->{config}->{task_timeout} or die "missing task_timeout"; 14 timeout $timeout, "watching $args->{target} $args->{plugin}", sub { 16 15 if ( my $message = $args->{plugin}->is_dead( $args->{target} ) ) { 17 16 $context->add_result( … … 27 26 28 27 1; 28 __END__ 29 29 30 =head1 NAME 31 32 App::MadEye::Plugin::Worker::Simple - simple worker 33 34 =head1 SCHEMA 35 36 type: map 37 mapping: 38 task_timeout: 39 required: yes 40 type: int 41 42 =head1 SEE ALSO 43 44 L<App::MadEye>
![(please configure the [header_logo] section in trac.ini)](/share/chrome/site/your_project_logo.png)