The GearmanWorker class

(PECL gearman >= 0.5.0)

¼ò½é

ÀàÕªÒª

GearmanWorker {
/* ·½·¨ */
public addFunction ( string $function_name , callable $function [, mixed &$context [, int $timeout ]] ) : bool
public addOptions ( int $option ) : bool
public addServer ([ string $host = 127.0.0.1 [, int $port = 4730 ]] ) : bool
public addServers ( string $servers = 127.0.0.1:4730 ) : bool
public clone ( void ) : void
public __construct ( void )
public echo ( string $workload ) : bool
public error ( void ) : string
public getErrno ( void ) : int
public options ( void ) : int
public register ( string $function_name [, int $timeout ] ) : bool
public removeOptions ( int $option ) : bool
public returnCode ( void ) : int
public setId ( string $id ) : bool
public setOptions ( int $option ) : bool
public setTimeout ( int $timeout ) : bool
public timeout ( void ) : int
public unregister ( string $function_name ) : bool
public unregisterAll ( void ) : bool
public wait ( void ) : bool
public work ( void ) : bool
}

Table of Contents

User Contributed Notes

spacewalker2002 at ukr dot net 26-Apr-2013 08:09
For background run use:

exec("nohup php worker.php >/dev/null 2>/dev/null &");