PHP » GoLang |
login |
register |
about
|
GoLang GearmanClient::doBackground
request it (411)
GoLang replacement for PHP's GearmanClient::doBackground
[edit | history]
PHP GearmanClient::doBackgroundPHP original manual for GearmanClient::doBackground [ show | php.net ]GearmanClient::doBackground(PECL gearman >= 0.5.0) GearmanClient::doBackground — Run a task in the background Description
public string GearmanClient::doBackground
( string
$function_name
, string $workload
[, string $unique
] )Runs a task in the background, returning a job handle which can be used to get the status of the running task. Parameters
Return ValuesThe job handle for the submitted task. Examples
Example #1 Submit and monitor a background job The worker in this example has an artificial delay introduced to mimic a long running job. The client script periodically checks the status of the running job.
<?php The above example will output something similar to: Running: true, numerator: 3, denomintor: 14 Running: true, numerator: 6, denomintor: 14 Running: true, numerator: 9, denomintor: 14 Running: true, numerator: 12, denomintor: 14 Running: false, numerator: 0, denomintor: 0 done! See Also
|
more
Recently updated
more
Most requested
more
Last requests
|