NAME

MangoX::Queue::Job - A job consumed from MangoX::Queue

DESCRIPTION

MangoX::Queue::Job is an object representing a job that has been consumed from MangoX::Queue. The object is just a document/job retrieved from the queue that is blessed, with an added desructor method.

This class is used internally by MangoX::Queue

SYNOPSIS

use MangoX::Queue::Job;

my $doc = {...};

my $job = new MangoX::Queue::Job($doc);

ATTRIBUTES

MangoX::Queue::Job implements the following attributes:

has_finished

my $finished = $job->has_finished;
$job->has_finished(1);

Is set to 1 when the job has finished, either through the DESTROY or finished methods.

METHODS

MangoX::Queue::Job implements the following methods:

DESTROY

Called automatically when $job goes out of scope, undef'd, or refcount goes to 0.

Calls finished, emitting a finished event if it hasn't already been emitted.

finished

Emits a finished event if it hasn't already been emitted.

SEE ALSO

MangoX::Queue::Tutorial, Mojolicious, Mango