class Queue

Supports commands related to queues.

Constants

private JOBS_PATH

Path to jobs classes.

Methods

static void
deleteJob(array $job, QueueManager $queue)

Deletes a job

static void
isValidJob(string $jobClass)

Test if name of job class is valid.

static int
iterations(int|null $max = 0, bool $once = false)

Determines number of iterations to run worker

static int
makeJob(string $jobName)

Creates a new job class.

static int
queueMigration()

Creates new queue migration.

static void
shutdownSignals()

Manages shutdown signals.

static int
worker(int $maxIterations, string $queueName = 'default')

Worker for queue.

Details

at line 27
static private void deleteJob(array $job, QueueManager $queue)

Deletes a job

Parameters

array $job

The job to be deleted.

QueueManager $queue

The QueueManager instance.

Return Value

void

at line 39
static private void isValidJob(string $jobClass)

Test if name of job class is valid.

Parameters

string $jobClass

The name of class to test.

Return Value

void

at line 52
static int iterations(int|null $max = 0, bool $once = false)

Determines number of iterations to run worker

Parameters

int|null $max

$max The number of times to run worker.

bool $once

Runs worker for one iteration if set to true.

Return Value

int

The number of iterations.

at line 67
static int makeJob(string $jobName)

Creates a new job class.

Parameters

string $jobName

The name of the job class.

Return Value

int

A value that indicates success, invalid, or failure.

at line 82
static int queueMigration()

Creates new queue migration.

Return Value

int

A value that indicates success, invalid, or failure.

at line 96
static private void shutdownSignals()

Manages shutdown signals.

Return Value

void

at line 114
static int worker(int $maxIterations, string $queueName = 'default')

Worker for queue.

Parameters

int $maxIterations
string $queueName

The name of the queue to run.

Return Value

int

A value that indicates success, invalid, or failure.