Problems and solutions of using queue in Yii


Recently, there are some problems in the implementation of wechat message push. When we batch push wechat notifications, I used the form of queue to realize wechat message push. However, when using the queue, there is no problem in the queue process, but the queue task is not executed. After about an hour of research, I finally found the problem


Use queue:

Yii::$app->queue->push(new ExaminerNoticeJob([
    'test' => $test,

When executing the queue, it is found in the queue table of the queue record that the queue process is indeed recorded. After executing the queue, the queue process is indeed executed, but the action in my queue is not executed. Later, it is found that this is due to the too large parameter transfer when calling the queue. Although the queue is executed, the information is incomplete due to the too large parameter transfer information, so it cannot be executed Perform my queue tasks


By reducing the parameters of the delivery queue task as much as possible, you can find that the queue task performs normally…

Recommended Today

Large scale distributed storage system: Principle Analysis and architecture practice.pdf

Focus on “Java back end technology stack” Reply to “interview” for full interview information Distributed storage system, which stores data in multiple independent devices. Traditional network storage system uses centralized storage server to store all data. Storage server becomes the bottleneck of system performance and the focus of reliability and security, which can not meet […]