Answer the question
In order to leave comments, you need to log in
Why is the gearman background task not being added?
Hello.
There are 2 tasks, one of them processes the file and the other deletes it.
The first task works out normally under the pressure of the task. But the second one does not want to be added.
I am using Filsh/yii2-gearman
console.php
...
'gearman' => [
'class' => 'filsh\yii2\gearman\GearmanComponent',
'servers' => [
['host' => '127.0.0.1', 'port' => 4730],
],
'user' => 'php.lamuz',
'jobs' => [
'ffmpeg' => [
'class' => 'app\common\jobs\FfmpegHandler',
'path' => '...'
],
'delete' => [
'class' => 'app\common\jobs\DeleteHandler',
'path' => '...'
]
]
],
...
$handler = \Yii::$app->gearman->getDispatcher()->background('delete', new JobWorkload([
'params' => [
'id' => $model->id,
'filePath' => $this->getPath($model)
]
]), Dispatcher::NORMAL, mt_rand(1, 9));
string(14) "H:vps-28-15:17"
Answer the question
In order to leave comments, you need to log in
From the assumptions:
1) rename the task, I saw such a rake
2) somewhere in the process of adding a task, the process crashes. Otmonitorte
Question: how do you watch the queue?
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question