Download the PHP package yuav/gearmanadmin without Composer
On this page you can find all versions of the php package yuav/gearmanadmin. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download yuav/gearmanadmin
More information about yuav/gearmanadmin
Files in yuav/gearmanadmin
Package gearmanadmin
Short Description Gearman admin library to get status and version, and list workers, set maxqueue or shutdown Gearman server
License MIT
Homepage http://github.com/Yuav/gearmanadmin
Informations about the package gearmanadmin
GearmanAdmin
PHP Client for the Gearman Administrative Protocol
Installing via Composer (recommended)
-
Install composer in your project:
-
Create a composer.json file in your project root:
- Install via composer
Usage
From Gearman documentation:
Administrative Protocol
The Gearman job server also supports a text-based protocol to pull information and run some administrative tasks. This runs on the same port as the binary protocol, and the server differentiates between the two by looking at the first character. If it is a NULL (\0), then it is binary, if it is non-NULL, that it attempts to parse it as a text command. The following commands are supported:
workers
This sends back a list of all workers, their file descriptors,
their IPs, their IDs, and a list of registered functions they can
perform. The list is terminated with a line containing a single
'.' (period). The format is:
FD IP-ADDRESS CLIENT-ID : FUNCTION ...
Arguments:
- None.
status
This sends back a list of all registered functions. Next to
each function is the number of jobs in the queue, the number of
running jobs, and the number of capable workers. The columns are
tab separated, and the list is terminated with a line containing
a single '.' (period). The format is:
FUNCTION\tTOTAL\tRUNNING\tAVAILABLE_WORKERS
Arguments:
- None.
maxqueue
This sets the maximum queue size for a function. If no size is
given, the default is used. If the size is negative, then the queue
is set to be unlimited. This sends back a single line with "OK".
Arguments:
- Function name.
- Optional maximum queue size.
shutdown
Shutdown the server. If the optional "graceful" argument is used,
close the listening socket and let all existing connections
complete.
Arguments:
- Optional "graceful" mode.
version
Send back the version of the server.
Arguments:
- None.