W3cubDocs

/Laravel 8

WorkerOptions

class WorkerOptions (View source)

Properties

int $name The name of the worker.
int $backoff The number of seconds to wait before retrying a job that encountered an uncaught exception.
int $memory The maximum amount of RAM 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 amount of times a job may be attempted.
bool $force Indicates if the worker should run in maintenance mode.
bool $stopWhenEmpty Indicates if the worker should stop when queue is empty.
int $maxJobs The maximum number of jobs to run.
int $maxTime The maximum number of seconds a worker may live.

Methods

void __construct(string $name = 'default', int $backoff = 0, int $memory = 128, int $timeout = 60, int $sleep = 3, int $maxTries = 1, bool $force = false, bool $stopWhenEmpty = false, int $maxJobs = 0, int $maxTime = 0)

Create a new worker options instance.

Details

void __construct(string $name = 'default', int $backoff = 0, int $memory = 128, int $timeout = 60, int $sleep = 3, int $maxTries = 1, bool $force = false, bool $stopWhenEmpty = false, int $maxJobs = 0, int $maxTime = 0)

Create a new worker options instance.

Parameters

string $name
int $backoff
int $memory
int $timeout
int $sleep
int $maxTries
bool $force
bool $stopWhenEmpty
int $maxJobs
int $maxTime

Return Value

void

© Taylor Otwell
Licensed under the MIT License.
Laravel is a trademark of Taylor Otwell.
https://laravel.com/api/8.x/Illuminate/Queue/WorkerOptions.html