Johannes Plunien > Gearman-Driver-0.02008 > Gearman::Driver::Job

Download:
Gearman-Driver-0.02008.tar.gz

Dependencies

Annotate this POD

CPAN RT

New  1
Open  0
View/Report Bugs
Source  

NAME ^

Gearman::Driver::Job - Handles the POE magic

DESCRIPTION ^

This class is responsible for starting/stopping processes as well as handling all pipes (STDOUT/STDERR/STDIN) of the processes. All events are written to a logfile. Possible events are:

The current interface may only be interesting for people subclassing Gearman::Driver or for people writing commands/extensions for Gearman::Driver::Console.

ATTRIBUTES ^

driver

Reference to the Gearman::Driver instance.

name

The job's name.

methods

ArrayRef of Gearman::Driver::Job::Method objects.

max_processes

Maximum number of concurrent processes this job may have.

min_processes

Minimum number of concurrent processes this job may have.

processes

This attribute stores a key/value pair containing: $pid => $job

It provides following methods:

gearman

Instance of Gearman::Driver::Adaptor.

session

Instance of POE::Session.

lastrun

Each time this job is called it stores time() in this attribute.

lasterror

Each time this job failed it stores time() in this attribute.

lasterror_msg

Each time this job failed it stores the error message in this attribute.

worker

Reference to the worker object.

METHODS ^

add_process

Starts/forks/adds another process of this job.

remove_process

Removes/kills one process of this job.

AUTHOR ^

See Gearman::Driver.

COPYRIGHT AND LICENSE ^

See Gearman::Driver.

SEE ALSO ^

syntax highlighting: