Net::Gearman::Administrative - A wrapper around Gearmans administrative protocol
version 0.00101
This module wraps around the administrative protocol of Gearman. You can use it to quere the registered workers, the number of pending jobs per function, ...
We only tested this module against Gearman::Server 1.12.
The address of the server to connect to.
Will be checked it either a valid hostname, a valid IPv4 oder a valid IPv6 address.
The port to connect to.
Must be a number between 1 and 65535 (inclusive).
Returns a HashRef with all registered workers.
{ $client_id => { fd => $file_descriptor, ip => $ip_address_of_worker, functions => [ 'mega_cool_function', 'only_super_cool_function', ], } }
Returns a HashRef with all functions and the number of jobs.
{ $function => { num_workers => $num_workers_with_this_function, pending_jobs => $jobs_in_queue_waiting_to_be_picked_up, current_jobs => $jobs_currently_being_processed_by_a_worker, } }
use Net::Gearman::Administrative; my $admin = modules::Gearman::Administrative->new(hostname => '127.0.0.1', port => 7003); my $workers = $admin->get_workers; my $status = $admin->get_status;
Please report bugs and/or feature-requests at our GitHub repository: https://github.com/autinitysystems/Net-Gearman-Administrative/issues
Moritz Grosch <moritz.grosch@autinity.de>
This software is copyright (c) 2015 by afr-consulting GmbH.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.
To install Net::Gearman::Administrative, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Net::Gearman::Administrative
CPAN shell
perl -MCPAN -e shell install Net::Gearman::Administrative
For more information on module installation, please visit the detailed CPAN module installation guide.