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 $memory = 128, int $timeout = 60, int $sleep = 3, int $maxTries = 1, bool $force = false, int $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 $memory = 128, int $timeout = 60, int $sleep = 3, int $maxTries = 1, bool $force = false, int $rest = 0)

Create a new listener options instance.

Parameters

string $name

the name of the worker

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

the maximum amount of RAM in megabytes the worker may consume

int $timeout

the maximum number of seconds a child worker may run

int $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

int $rest

the number of seconds to rest between jobs