Код: Выделить всё
$this->video = hash('MD5', $this->video_file->baseName . floor($this->task_id / 100)) . '.' . $this->video_file->extension;
$filepath = $this->getRelativeVideoPath() . $this->video;
$this->video_file->saveAs($this->getRelativeVideoPath() . $this->video);// так работает
Yii::$app->queue->push(new TaskVideoJob([
'file' => $this->video_file,
'path' => $filepath,
])); //так не работает
Код: Выделить всё
class TaskVideoJob extends BaseObject implements JobInterface
{
public $file;
public $path;
public function execute($queue) {
$this->file->saveAs($this->path);
}
}