GearmanJob::__construct

(PECL gearman >= 0.5.0) Create a GearmanJob instance public GearmanJob::__construct ( void ) Creates a GearmanJob instance representing a job the worker is to complete. Returns: A GearmanJob object.

GearmanJob::complete

(PECL gearman <= 0.5.0) Send the result and complete status (deprecated) public bool GearmanJob::complete ( string $result ) Sends result data and the complete status update for this job. Note: This method has been replaced by GearmanJob::sendComplete() in the 0.6.0 release of the Gearman extension. Parameters: result Serialized result data. Re

GearmanClient::timeout

(PECL gearman >= 0.6.0) Get current socket I/O activity timeout value public int GearmanClient::timeout ( void ) Returns the timeout in milliseconds to wait for I/O activity. Returns: Timeout in milliseconds to wait for I/O activity. A negative value means an infinite timeout. See also: GearmanClient::setTime

GearmanClient::setWorkloadCallback

(PECL gearman >= 0.5.0) Set a callback for accepting incremental data updates public bool GearmanClient::setWorkloadCallback ( callable $callback ) Sets a function to be called when a worker needs to send back data prior to job completion. A worker can do this when it needs to send updates, send partial results, or flush data during long running jobs. The callback should accept a single argument, a GearmanTask object.

GearmanClient::setWarningCallback

(PECL gearman >= 0.5.0) Set a callback for worker warnings public bool GearmanClient::setWarningCallback ( callable $callback ) Sets a function to be called when a worker sends a warning. The callback should accept a single argument, a GearmanTask object. Parameters: callback A function to call Returns: Returns TRUE on success or FALSE on fail

GearmanClient::setTimeout

(PECL gearman >= 0.6.0) Set socket I/O activity timeout public bool GearmanClient::setTimeout ( int $timeout ) Sets the timeout for socket I/O activity. Parameters: timeout An interval of time in milliseconds Returns: Always returns TRUE.

GearmanClient::setStatusCallback

(PECL gearman >= 0.5.0) Set a callback for collecting task status public bool GearmanClient::setStatusCallback ( callable $callback ) Sets a callback function used for getting updated status information from a worker. The function should accept a single argument, a GearmanTask object. Parameters: callback A function to call Returns: Returns TR

GearmanClient::setOptions

(PECL gearman >= 0.5.0) Set client options public bool GearmanClient::setOptions ( int $options ) Sets one or more client options. Parameters: options The options to be set Returns: Always returns TRUE.

GearmanClient::setFailCallback

(PECL gearman >= 0.5.0) Set callback for job failure public bool GearmanClient::setFailCallback ( callable $callback ) Sets the callback function to be used when a task does not complete successfully. The function should accept a single argument, a GearmanTask object. Parameters: callback A function to call Returns: Returns TRUE on success or

GearmanClient::setExceptionCallback

(PECL gearman >= 0.5.0) Set a callback for worker exceptions public bool GearmanClient::setExceptionCallback ( callable $callback ) Specifies a function to call when a worker for a task sends an exception. Parameters: callback Function to call when the worker throws an exception Returns: Returns TRUE on success or FALSE on failure.