Adam Thomason > Gearman-WorkerSpawner > Gearman::WorkerSpawner::BaseWorker::Client

Download:
Gearman-WorkerSpawner-2.16.tar.gz

Dependencies

Annotate this POD

View/Report Bugs
Source  

NAME ^

Gearman::WorkerSpawner::BaseWorker::Client - Gearman::Client wrapper for use with Gearman::WorkerSpawner::BaseWorker workers

SYNOPSIS ^

    my $client = Gearman::WorkerSpawner::BaseWorker::Client->new;
    $client->job_servers('127.0.0.1');

    # foreground job
    my @retvals = $client->run_method(adder => { right_hand => 3 });

    # background job
    $client->run_method_background(log => { message => 'beep' });

DESCRIPTION ^

This class implements the run_method function from Gearman::WorkerSpawner in the synchronous Gearman::Client client. Instead of calling an on_complete callback, the return value of the job is returned.

The run_method_background method may be used to dispatch background jobs. It has no meaningful return value.

syntax highlighting: