0 follower

Interface Yiisoft\Queue\QueueInterface

Implemented byYiisoft\Queue\Debug\QueueDecorator, Yiisoft\Queue\Queue, Yiisoft\Queue\Stubs\StubQueue

Public Methods

Hide inherited 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

Hide inherited constants

Constant Value Description Defined By
DEFAULT_CHANNEL 'yii-queue' Yiisoft\Queue\QueueInterface

Method Details

Hide inherited methods

getChannel() public abstract method

public abstract string getChannel ( )

                public function getChannel(): string;

            
listen() public abstract method

Listen to the queue and execute jobs as they come

public abstract void listen ( )

                public function listen(): void;

            
push() public abstract method

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;

            
run() public abstract method

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;

            
status() public abstract method

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;

            
withAdapter() public abstract method

public abstract Yiisoft\Queue\QueueInterface withAdapter ( Yiisoft\Queue\Adapter\AdapterInterface $adapter )
$adapter Yiisoft\Queue\Adapter\AdapterInterface

                public function withAdapter(AdapterInterface $adapter): static;