Interface Yiisoft\Queue\QueueInterface
| Implemented by | Yiisoft\Queue\Debug\QueueDecorator, Yiisoft\Queue\Queue, Yiisoft\Queue\Stubs\StubQueue |
|---|
Public Methods
| Method | Description | Defined By |
|---|---|---|
| getChannel() | Yiisoft\Queue\QueueInterface | |
| listen() | Listen to the queue and execute jobs as they come | Yiisoft\Queue\QueueInterface |
| push() | Pushes a message into the queue. | Yiisoft\Queue\QueueInterface |
| run() | Execute all existing jobs and exit | Yiisoft\Queue\QueueInterface |
| status() | Yiisoft\Queue\QueueInterface | |
| withAdapter() | Yiisoft\Queue\QueueInterface |
Constants
| Constant | Value | Description | Defined By |
|---|---|---|---|
| DEFAULT_CHANNEL | 'yii-queue' | Yiisoft\Queue\QueueInterface |
Method Details
Listen to the queue and execute jobs as they come
| public abstract void listen ( ) |
public function listen(): void;
Pushes a message into the queue.
| public abstract Yiisoft\Queue\Message\MessageInterface push ( Yiisoft\Queue\Message\MessageInterface $message, array|callable|Yiisoft\Queue\Middleware\Push\MiddlewarePushInterface|string $middlewareDefinitions ) | ||
| $message | Yiisoft\Queue\Message\MessageInterface | |
| $middlewareDefinitions | array|callable|Yiisoft\Queue\Middleware\Push\MiddlewarePushInterface|string | |
public function push(MessageInterface $message, MiddlewarePushInterface|callable|array|string ...$middlewareDefinitions): MessageInterface;
Execute all existing jobs and exit
| public abstract integer run ( integer $max = 0 ) | ||
| $max | integer | |
| return | integer |
Number of messages processed. |
|---|---|---|
public function run(int $max = 0): int;
| public abstract \Yiisoft\Queue\JobStatus status ( integer|string $id ) | ||
| $id | integer|string |
A message id |
| throws | InvalidArgumentException |
when there is no such id in the adapter |
|---|---|---|
public function status(string|int $id): JobStatus;
| public abstract Yiisoft\Queue\QueueInterface withAdapter ( Yiisoft\Queue\Adapter\AdapterInterface $adapter ) | ||
| $adapter | Yiisoft\Queue\Adapter\AdapterInterface | |
public function withAdapter(AdapterInterface $adapter): static;
Signup or Login in order to comment.