| 1 | <?php |
||
| 10 | class Options |
||
| 11 | { |
||
| 12 | /** |
||
| 13 | * The number of seconds before a released job will be available. |
||
| 14 | * |
||
| 15 | * @var int |
||
| 16 | */ |
||
| 17 | public $delay; |
||
| 18 | |||
| 19 | /** |
||
| 20 | * The maximum amount of RAM the worker may consume. |
||
| 21 | * |
||
| 22 | * @var int |
||
| 23 | */ |
||
| 24 | public $memory; |
||
| 25 | |||
| 26 | /** |
||
| 27 | * The maximum number of seconds a child worker may run. |
||
| 28 | * |
||
| 29 | * @var int |
||
| 30 | */ |
||
| 31 | public $timeout; |
||
| 32 | |||
| 33 | /** |
||
| 34 | * The number of seconds to wait in between polling the queue. |
||
| 35 | * |
||
| 36 | * @var int |
||
| 37 | */ |
||
| 38 | public $sleep; |
||
| 39 | |||
| 40 | /** |
||
| 41 | * The maximum amount of times a job may be attempted. |
||
| 42 | * |
||
| 43 | * @var int |
||
| 44 | */ |
||
| 45 | public $maxTries; |
||
| 46 | |||
| 47 | /** |
||
| 48 | * Indicates if the worker should run in maintenance mode. |
||
| 49 | * |
||
| 50 | * @var bool |
||
| 51 | */ |
||
| 52 | public $force; |
||
| 53 | |||
| 54 | /** |
||
| 55 | * WorkerOptions constructor. |
||
| 56 | * |
||
| 57 | * @param int $delay |
||
| 58 | * @param int $memory |
||
| 59 | * @param int $timeout |
||
| 60 | * @param int $sleep |
||
| 61 | * @param int $maxTries |
||
| 62 | * @param bool $force |
||
| 63 | */ |
||
| 64 | public function __construct( |
||
| 79 | } |
||
| 80 |