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

Method Details

Hide inherited methods

getChannel() public abstract method

public abstract getChannel( ): string

                public function getChannel(): string;

            
listen() public abstract method

Listen to the queue and execute jobs as they come

public abstract listen( ): void

                public function listen(): void;

            
push() public abstract method

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;

            
run() public abstract method

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;

            
status() public abstract method

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;

            
withAdapter() public abstract method

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

                public function withAdapter(AdapterInterface $adapter): static;