-
-
11 Jun 2009 16:04:26 UTC
- Distribution: GearmanX-Worker
- Module version: 0.01
- Source (raw)
- Browse (raw)
- Changes
- How to Contribute
- Issues
- Testers (50 / 303 / 2)
- Kwalitee
Bus factor: 1- % Coverage
- License: perl_5
- Activity
24 month- Tools
- Download (8.46KB)
- MetaCPAN Explorer
- Permissions
- Subscribe to distribution
- Permalinks
- This version
- Latest version
and 1 contributors-
Robert Barta
- Dependencies
- unknown
- Reverse dependencies
- CPAN Testers List
- Dependency graph
NAME
GearmanX::Client - Gearman client which works with GearmanX::Worker
SYNOPSIS
use GearmanX::Client; my $c = new GearmanX::Client ( SERVERS => ['1.1.1.1'] ); # launch job and wait for results $result = $c->job ('jobname', { one => 'param', at => 'a time' }); # same thing $result = $c->job_sync (....); # launch job and continue $jobid = $c->job_async ('jobname', { one => 'param', at => 'a time' });
DESCRIPTION
This class is simply a convenience to work comfortably alongside GearmanX::Worker. In that it mostly takes care that the single parameter (a scalar, a hash reference or a list reference) is serialized before the job is submitted to the gearman server.
INTERFACE
Constructor
The constructor expects the following fields:
SERVERS
-
This is a list reference holding the list of IP addresses of the involved gearman job servers.
Methods
- status
-
die unless $client->status
Returns non-zero if a jobserver can be contact. Launches a fake job to test that.
- job, job_sync
-
$client->job ($jobname, $parameter);
Launches a job, serializes the parameter and waits for the result. That will be deserialized.
job_async
-
$client->job_async ($jobname, $parameter);
Launches a job, serializes the parameter and immediately returns the job id.
AUTHOR
Robert Barta,
<rho at devc.at>
BUGS
Please report any bugs or feature requests to
bug-gearmanx-worker at rt.cpan.org
, or through the web interface at http://rt.cpan.org/NoAuth/ReportBug.html?Queue=GearmanX-Worker. I will be notified, and then you'll automatically be notified of progress on your bug as I make changes.COPYRIGHT & LICENSE
Copyright 2009 Robert Barta, all rights reserved.
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
Module Install Instructions
To install GearmanX::Worker, copy and paste the appropriate command in to your terminal.
cpanm GearmanX::Worker
perl -MCPAN -e shell install GearmanX::Worker
For more information on module installation, please visit the detailed CPAN module installation guide.