php8.5
Home/ Manual/ gearman / gearmanclient/ GearmanClient::addTaskHighBackground

GearmanClient::addTaskHighBackground

PHP function Edit on GitHub ✎

(PECL gearman >= 0.5.0)

Add a high priority background task to be run in parallel

Description

GearmanClient::addTaskHighBackground(string $function_name, string|int|float $workload, mixed $context = null, string|null $unique_key = null): GearmanTask|false

Adds a high priority background task to be run in parallel with other tasks. Call this method for all the tasks to be run in parallel, then call GearmanClient::runTasks to perform the work. Tasks with a high priority will be selected from the queue before those of normal or low priority.

Parameters

function_name

Functionname

workload

Workload

context

Context

unique_key

Unique

Return Values

A GearmanTask object or false if the task could not be added.

See Also

  • GearmanClient::addTask
  • GearmanClient::addTaskHigh
  • GearmanClient::addTaskLow
  • GearmanClient::addTaskBackground
  • GearmanClient::addTaskLowBackground
  • GearmanClient::runTasks

Source: reference/gearman/gearmanclient/addtaskhighbackground.xml · from the official PHP manual (php/doc-en)