QueueWorker
Drives a PollableQueueDriverInterface’s backlog one job at a time; used by queue:work.
Synopsis
Section titled “Synopsis”final readonly class QueueWorker
| Source | QueueWorker.php |
Constructor
Section titled “Constructor”__construct()
Section titled “__construct()”public function __construct(JobExecutor $executor): mixed
| Parameter | Type | Description |
|---|---|---|
$executor | JobExecutor |
Returns mixed
Methods
Section titled “Methods”| Method | Description |
|---|---|
processNext(PollableQueueDriverInterface $driver): bool |
processNext()
Section titled “processNext()”public function processNext(PollableQueueDriverInterface $driver): bool
| Parameter | Type | Description |
|---|---|---|
$driver | PollableQueueDriverInterface |
Returns bool — True if a job was reserved and processed (success or failure); false if the queue was empty.