The GearmanClient class

(PECL gearman >= 0.5.0)

Introduction

Represents a class for connecting to a Gearman job server and making requests to perform some function on provided data. The function performed must be one registered by a Gearman worker and the data passed is opaque to the job server.

Class synopsis

class GearmanClient {
/* Methods */
public addOptions(int $options): bool
public addServer(string $host = 127.0.0.1, int $port = 4730): bool
public addServers(string $servers = 127.0.0.1:4730): bool
public addTask(
    string $function_name,
    string $workload,
    mixed &$context = ?,
    string $unique = ?
): GearmanTask
public addTaskBackground(
    string $function_name,
    string $workload,
    mixed &$context = ?,
    string $unique = ?
): GearmanTask
public addTaskHigh(
    string $function_name,
    string $workload,
    mixed &$context = ?,
    string $unique = ?
): GearmanTask
public addTaskHighBackground(
    string $function_name,
    string $workload,
    mixed &$context = ?,
    string $unique = ?
): GearmanTask
public addTaskLow(
    string $function_name,
    string $workload,
    mixed &$context = ?,
    string $unique = ?
): GearmanTask
public addTaskLowBackground(
    string $function_name,
    string $workload,
    mixed &$context = ?,
    string $unique = ?
): GearmanTask
public addTaskStatus(string $job_handle, string &$context = ?): GearmanTask
public clearCallbacks(): bool
public __construct()
public context(): string
public data(): string
public do(string $function_name, string $workload, string $unique = ?): string
public doBackground(string $function_name, string $workload, string $unique = ?): string
public doHigh(string $function_name, string $workload, string $unique = ?): string
public doHighBackground(string $function_name, string $workload, string $unique = ?): string
public doJobHandle(): string
public doLow(string $function_name, string $workload, string $unique = ?): string
public doLowBackground(string $function_name, string $workload, string $unique = ?): string
public doNormal(string $function_name, string $workload, string $unique = ?): string
public doStatus(): array
public echo(string $workload): bool
public error(): string
public getErrno(): int
public jobStatus(string $job_handle): array
public ping(string $workload): bool
public removeOptions(int $options): bool
public returnCode(): int
public runTasks(): bool
public setClientCallback(callable $callback): void
public setCompleteCallback(callable $callback): bool
public setContext(string $context): bool
public setCreatedCallback(string $callback): bool
public setData(string $data): bool
public setDataCallback(callable $callback): bool
public setExceptionCallback(callable $callback): bool
public setFailCallback(callable $callback): bool
public setOptions(int $options): bool
public setStatusCallback(callable $callback): bool
public setTimeout(int $timeout): bool
public setWarningCallback(callable $callback): bool
public setWorkloadCallback(callable $callback): bool
public timeout(): int
public wait(): bool
}

Table of Contents

Here you can write a comment


Please enter at least 10 characters.
Loading... Please wait.
* Pflichtangabe
There are no comments available yet.

PHP cURL Tutorial: Using cURL to Make HTTP Requests

cURL is a powerful PHP extension that allows you to communicate with different servers using various protocols, including HTTP, HTTPS, FTP, and more. ...

TheMax

Autor : TheMax
Category: PHP-Tutorials

Midjourney Tutorial - Instructions for beginners

There is an informative video about Midjourney, the tool for creating digital images using artificial intelligence, entitled "Midjourney tutorial in German - instructions for beginners" ...

Mike94

Autor : Mike94
Category: KI Tutorials

Basics of views in MySQL

Views in a MySQL database offer the option of creating a virtual table based on the result of an SQL query. This virtual table can be queried like a normal table without changing the underlying data. ...

admin

Autor : admin
Category: mySQL-Tutorials

Publish a tutorial

Share your knowledge with other developers worldwide

Share your knowledge with other developers worldwide

You are a professional in your field and want to share your knowledge, then sign up now and share it with our PHP community

learn more

Publish a tutorial