array ( 0 => 'index.php', 1 => 'PHP Manual', ), 'head' => array ( 0 => 'UTF-8', 1 => 'it', ), 'this' => array ( 0 => 'gearmanworker.register.php', 1 => 'GearmanWorker::register', 2 => 'Register a function with the job server', ), 'up' => array ( 0 => 'class.gearmanworker.php', 1 => 'GearmanWorker', ), 'prev' => array ( 0 => 'gearmanworker.options.php', 1 => 'GearmanWorker::options', ), 'next' => array ( 0 => 'gearmanworker.removeoptions.php', 1 => 'GearmanWorker::removeOptions', ), 'alternatives' => array ( ), 'source' => array ( 'lang' => 'en', 'path' => 'reference/gearman/gearmanworker/register.xml', ), 'history' => array ( ), ); $setup["toc"] = $TOC; $setup["toc_deprecated"] = $TOC_DEPRECATED; $setup["parents"] = $PARENTS; manual_setup($setup); contributors($setup); ?>

GearmanWorker::register

(PECL gearman >= 0.6.0)

GearmanWorker::registerRegister a function with the job server

Descrizione

public GearmanWorker::register(string $function_name, int $timeout = 0): bool

Registers a function name with the job server with an optional timeout. The timeout specifies how many seconds the server will wait before marking a job as failed. If the timeout is set to zero, there is no timeout.

Elenco dei parametri

function_name

The name of a function to register with the job server

timeout

An interval of time in seconds

Valori restituiti

A standard Gearman return value.

Vedere anche: