class ListenerOptions extends WorkerOptions

Properties

string|null $environment

The environment the worker should run in.

Methods

__construct(string $name = 'default', string|null $environment = null, array|int $backoff = 0, float|string $memory = 128, int $timeout = 60, float $sleep = 3, int $maxTries = 1, bool $force = false, float $rest = 0)

Create a new listener options instance.

Details

at line 19
__construct(string $name = 'default', string|null $environment = null, array|int $backoff = 0, float|string $memory = 128, int $timeout = 60, float $sleep = 3, int $maxTries = 1, bool $force = false, float $rest = 0)

Create a new listener options instance.

Parameters

string $name

the name of the worker

string|null $environment
array|int $backoff
float|string $memory

the maximum RAM in megabytes or a percentage of PHP's memory limit

int $timeout

the maximum number of seconds a child worker may run

float $sleep

the number of seconds to wait in between polling the queue

int $maxTries

the maximum number of times a job may be attempted

bool $force

indicates if the worker should run in maintenance mode

float $rest

the number of seconds to rest between jobs