Documentation

CRM_Queue_TaskRunner
in package

`CRM_Queue_TaskRunner` a list tasks from a queue. It is designed to supported background tasks which run automatically.

This runner is not appropriate for all queues or workloads, so you might choose or create a different runner. For example, CRM_Queue_Runner is geared toward background task lists.

Tags
see
CRM_Queue_Runner

Table of Contents

Methods

run()  : string
assertType()  : mixed
createContext()  : CRM_Queue_TaskContext
isRetriable()  : bool

Methods

run()

public run(CRM_Queue_Queue $queue, mixed $item) : string
Parameters
$queue : CRM_Queue_Queue
$item : mixed
Tags
throws
CRM_Core_Exception
Return values
string

One of the following:

  • 'ok': Task executed normally. Removed from queue.
  • 'retry': Task encountered an error. Will try again later.
  • 'delete': Task encountered an error. Will not try again later. Removed from queue.
  • 'abort': Task encountered an error. Will not try again later. Stopped the queue.

assertType()

private assertType(mixed $object, array<string|int, mixed> $types, string $message) : mixed
Parameters
$object : mixed
$types : array<string|int, mixed>
$message : string

        
On this page

Search results