Open
Description
If I have code that look like this:
<?php
$redis = \Yii::$app->redis;
$redis->multi();
\Yii::$app->queue->push(new SomeJob());
\Yii::$app->queue->push(new SomeJob());
$redis->exec();
The job will be pushed with QUEUED
as the id, and only the last job that will be run. That's because this line read from to use an incremented number as the job id.
I propose to use something that doesn't read from redis as the value for id, such as uniqid
.
Also, can I know the reason why we used hset to store the job message and only push the job id to the list, instead of directly pushing the id along with the job message to list and not using hset?