Conditions | 1 |
Paths | 1 |
Total Lines | 11 |
Code Lines | 7 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
24 | public function connect(array $config) |
||
25 | { |
||
26 | $config = array_merge([ |
||
27 | 'limit' => 15, |
||
28 | 'connection' => 'mongodb', |
||
29 | ], $config); |
||
30 | |||
31 | $connection = Yii::$app->get($config['connection']); |
||
32 | |||
33 | return new MongoThreadQueue($connection, $config['table'], $config['queue'], $config['expire'], $config['limit']); |
||
34 | } |
||
35 | } |
||
36 |