프로퍼티 | 타입 | 설명 | |
---|---|---|---|
$gearman_servers | The list of Gearman servers. | ||
$gearman_worker | The libGearman Worker instance |
메소드 | 설명 | |
---|---|---|
do_job ( array $job ) : boolean | Executes a Job pulled from Gearman. On a multisite instance it switches to the target site before executing the job. And the site is restored once executing is finished. | |
get_async_group ( ) : string | The Function Group used to split libGearman functions on a multi-network install. | |
get_gearman_worker ( ) : GearmanWorker | false | Builds the libGearman Worker Instance if the extension is installed. Once created returns the previous instance without reinitialization. | |
get_servers ( ) : array | The Gearman Servers to connect to as defined in wp-config.php. | |
register ( ) : boolean | Creates a Gearman Worker and initializes the servers it should connect to. The callback that will execute a job's hook is also setup here. | |
work ( ) : boolean | Pulls a job from the Gearman Queue and tries to execute it. |
public get_async_group ( ) : string | ||
리턴 | string | The prefixed group name |
public get_gearman_worker ( ) : GearmanWorker | false | ||
리턴 | GearmanWorker | false | An instance of GearmanWorker |
public get_servers ( ) : array | ||
리턴 | array | The list of servers for this Worker. |