XAS::Lib::Gearman::Admin - An interface to the Gearman job queue.
use XAS:::Lib::Gearman::Admin; my $client = XAS::Lib::Gearman::Admin->new( -server => 'localhost', -port => '4730' );
This module is a wrapper around the Gearman Admin protocol. If unifies common methods with error handling to make main line code easier to work with.
This method initializes the module, it doesn't make a connection to the gearman server. It takes two parameters:
The server that gearman is running on, defaults to 'localhost'.
The IP port that geraman is listening on, defaults to 4730.
Connect to gearman.
Disconnect from gearman.
Tell gearman to shutdown. It takes one optional parameter:
Do the shutdown gracefully.
Send a "ping" to gearman. This will tell if the server is functioning.
Set the maximum number of workers for a queue. It takes two parameters:
The name of the queue.
The number of workers.
Returns the current version of the gearman server.
Retrieves the current status of queues on gearman. Depending on context, it can return an array or a reference to an array of XAS::Lib::Gearman::Admin::Status objects. It takes one optional parameter:
The name of the queue for the status request.
This method returns the workers attached to gearman. Depending on context, it can return an array or a reference to an array of XAS::Lib::Gearmam::Admin:::Worker objects. It takes one optional parameter:
The name of the queue for the worker request.
Kevin L. Esteb, <kevin@kesteb.us>
Copyright (C) 2011 by Kevin L. Esteb
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.8.8 or, at your option, any later version of Perl 5 you may have available.
To install XAS, copy and paste the appropriate command in to your terminal.
cpanm
cpanm XAS
CPAN shell
perl -MCPAN -e shell install XAS
For more information on module installation, please visit the detailed CPAN module installation guide.