Свойство | Тип | Описание | |
---|---|---|---|
$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. |