AnyEvent::Gearman::Job - gearman job


AnyEvent-Gearman documentation Contained in the AnyEvent-Gearman distribution.

Index


Code Index:

NAME

Top

AnyEvent::Gearman::Job - gearman job

SYNOPSIS

Top

    $job->complete($result);
    $job->data($data);
    $job->fail;
    $job->status($numerator, $denominator);
    $job->warning($warning);

METHODS

Top

complete($result)

data($data)

fail

status($numerator, $denominator)

warning($warning)

AUTHOR

Top

Daisuke Murase <typester@cpan.org>

Pedro Melo <melo@cpan.org>

COPYRIGHT AND LICENSE

Top


AnyEvent-Gearman documentation Contained in the AnyEvent-Gearman distribution.

package AnyEvent::Gearman::Job;
use Any::Moose;

extends 'AnyEvent::Gearman::Task';

no Any::Moose;

sub complete {
    my ($self, $result) = @_;
    $self->event( on_complete => $result );
}

sub data {
    my ($self, $data) = @_;
    $self->event( on_data => $data );
}

sub fail {
    my ($self) = @_;
    $self->event('on_fail');
}

sub status {
    my ($self, $numerator, $denominator) = @_;
    $self->event( on_status => $numerator, $denominator );
}

sub warning {
    my ($self, $warning) = @_;
    $self->event( on_warning => $warning );
}

__PACKAGE__->meta->make_immutable;

__END__