The queue extension sounds awesome, but it lacks MongoDB driver support.
I believe changes would be needed in the below mentioned lines and around the whole mutex concept.
I would be really happy to see MongoDB driver support in the official Queue extension.
Thanks in advance.
|
/** |
|
* @var Mutex|array|string |
|
*/ |
|
public $mutex = 'mutex'; |
|
/** |
|
* @var int timeout |
|
*/ |
|
public $mutexTimeout = 3; |
|
/** |
|
* @var string table name |
|
*/ |
|
public $tableName = '{{%queue}}'; |
|
/** |
|
* @inheritdoc |
|
*/ |
|
public function init() |
|
{ |
|
parent::init(); |
|
$this->db = Instance::ensure($this->db, Connection::class); |
|
$this->mutex = Instance::ensure($this->mutex, Mutex::class); |
|
} |
|
|
|
$tableSchema = $this->db->getTableSchema($this->tableName); |
|
return $this->db->getLastInsertID($tableSchema->sequenceName); |
The queue extension sounds awesome, but it lacks MongoDB driver support.
I believe changes would be needed in the below mentioned lines and around the whole mutex concept.
I would be really happy to see MongoDB driver support in the official Queue extension.
Thanks in advance.
yii2-queue/src/drivers/db/Queue.php
Lines 32 to 43 in 98ea96a
yii2-queue/src/drivers/db/Queue.php
Lines 58 to 67 in 98ea96a
yii2-queue/src/drivers/db/Queue.php
Lines 167 to 168 in 98ea96a