Immediate Queue
Centum\Queue\ImmediateQueue
immediately executes any tasks published to it.
This is technically not a queue as Tasks are executed synchronously within the publish()
method.
Constructor
Centum\Queue\ImmediateQueue(
Centum\Interfaces\Queue\TaskRunnerInterface $taskRunner
);
Features
Tasks are run instantly when publish()
is called.
As this is designed for testing and development, it also providers the getter getBuriedTasks()
so that you can inspect the contents of the queue.
As no Tasks are stored in the Queue, calling the consume()
method will throw NoTasksInQueueException
.