Conditions | 1 |
Paths | 1 |
Total Lines | 17 |
Code Lines | 10 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
92 | protected function processJob($connectionName, $id) |
||
93 | { |
||
94 | // automatically send every new message to available log routes |
||
95 | Yii::getLogger()->flushInterval = 1; |
||
96 | //manager |
||
97 | $queueManager = Yii::$app->jobqueue->getQueueManager(); |
||
98 | //worker |
||
99 | $worker = new Worker($queueManager, new MongoFailedJobProvider(Yii::$app->mongodb, 'yii_jobs_failed'), new ExceptionHandler()); |
||
100 | |||
101 | $worker->runJobById($connectionName, $id, new WorkerOptions( |
||
102 | $this->delay, |
||
103 | $this->memory, |
||
104 | $this->timeout, |
||
105 | $this->sleep, |
||
106 | $this->maxTries |
||
107 | )); |
||
108 | } |
||
109 | } |
||
110 |