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 |
Method Details
Listen to the queue and execute jobs as they come
| public abstract listen( ): void |
public function listen(): void;
Pushes a message into the queue.
| public abstract push( Yiisoft\Queue\Message\MessageInterface $message, array|callable|Yiisoft\Queue\Middleware\Push\MiddlewarePushInterface|string $middlewareDefinitions ): Yiisoft\Queue\Message\MessageInterface | ||
| $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 run( integer $max = 0 ): integer | ||
| $max | integer | |
| return | integer |
Number of messages processed. |
|---|---|---|
public function run(int $max = 0): int;
| public abstract status( integer|string $id ): \Yiisoft\Queue\JobStatus | ||
| $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 withAdapter( Yiisoft\Queue\Adapter\AdapterInterface $adapter ): Yiisoft\Queue\QueueInterface | ||
| $adapter | Yiisoft\Queue\Adapter\AdapterInterface | |
public function withAdapter(AdapterInterface $adapter): static;
Signup or Login in order to comment.