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 | $rest | The number of seconds to rest between jobs. |
|
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 the 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, int $rest = 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, int $rest = 0)
Create a new worker options instance.