This driver works with Gearman queues.
return [ 'bootstrap' => [ 'queue', // The component registers its own console commands ], 'components' => [ 'queue' => [ 'class' => \yii\queue\gearman\Queue::class, 'host' => 'localhost', 'port' => 4730, 'channel' => 'my_queue', ], ], ];
Console commands are used to process queued tasks.
listen command launches a daemon which infinitely queries the queue. If there are new tasks
they're immediately obtained and executed. This method is most efficient when command is properly
daemonized via supervisor or systemd.
run command obtains and executes tasks in a loop until queue is empty. Works well with
listen commands have options:
-v: print executing statuses into console.
--isolate: verbose mode of a job execute. If enabled, execute result of each job will be printed.
--color: highlighting for verbose mode.