This driver works with Beanstalk queues.
return [ 'bootstrap' => [ 'queue', // The component registers its own console commands ], 'components' => [ 'queue' => [ 'class' => \yii\queue\beanstalk\Queue::class, 'host' => 'localhost', 'port' => 11300, 'tube' => 'queue', ], ], ];
Console commands are used to execute and manage queued jobs.
yii queue/listen [timeout]
listen command launches a daemon which infinitely queries the queue. If there are new tasks
they're immediately obtained and executed. The
timeout parameter specifies the number of seconds to sleep between
querying the queue. This method is most efficient when the command is properly daemonized via
supervisor or systemd.
run command obtains and executes tasks in a loop until the queue is empty. This works well with
listen commands have options:
-v: print execution status to console.
--isolate: each task is executed in a separate child process.
--color: enable highlighting for verbose mode.
info command prints out information about the queue status.
yii queue/remove [id]
remove command removes a job from the queue.