yiisoft/yii2-queue
Yii2 Queue runs tasks asynchronously via pluggable queue backends: DB, Redis, RabbitMQ/AMQP, Beanstalk, ActiveMQ, and Gearman. Define jobs as classes implementing JobInterface and push them to the queue for background processing.
如果打开 handle属性,则在使用过程中同步运行任务。
一般在开发和调试应用程序时使用。
配置示例:
return [
'components' => [
'queue' => [
'class' => \yii\queue\sync\Queue::class,
'handle' => false, // 任务是否立即执行
],
],
];
How can I help you explore Laravel packages today?