NAME
Net::Gearman::Administrative - A wrapper around Gearmans administrative protocol
VERSION
version 0.00101
DESCRIPTION
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.
ATTRIBUTES
hostname
The address of the server to connect to.
Will be checked it either a valid hostname, a valid IPv4 oder a valid IPv6 address.
port
The port to connect to.
Must be a number between 1 and 65535 (inclusive).
METHODS
get_workers
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',
],
}
}
get_status
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,
}
}
SYNOPSYS
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;
BUGS
Please report bugs and/or feature-requests at our GitHub repository: https://github.com/autinitysystems/Net-Gearman-Administrative/issues
AUTHOR
Moritz Grosch <moritz.grosch@autinity.de>
COPYRIGHT AND LICENSE
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.