在命令行中运行 Yii2 队列/运行会导致 Windows Ampps 出错



我在Windows上的Ampps上运行Yii2,并且已经安装了 https://github.com/yiisoft/yii2-queue

我只是在尝试设置提供的示例,但我什至无法使其工作。

发生的事情是,当我跑步时

Yii::$app->queue->push(new QueueLeadEmailJob([
'url' => 'https://previews.123rf.com/images/fordzolo/fordzolo1506/fordzolo150600296/41026708-example-white-stamp-text-on-red-backgroud.jpg',
'file' => 'C:Program Files (x86)Amppswwwwebsitedomain.com41026708-example-white-stamp-text-on-red-backgroud.jpg',
]));

我正在将正确的值添加到队列表中。当我在命令行中运行 yii 队列/运行时,我得到

2018-09-11 08:36:37 [pid: 4144] - Worker is started
2018-09-11 08:36:37 [3] commoncomponentsqueuesQueueLeadEmailJob (attempt: 1, pid: 4144) - Error
> SymfonyComponentProcessExceptionProcessFailedException: The command "C:Program Files (x86)Amppsphp-7.1php.exe C:Program Files (x86)Amppswwwwebsitedomain.comhubyii queue/exec "3" "300" "1" "4144" --verbose=1 --color=" failed.
2018-09-11 08:36:37 [pid: 4144] - Worker is stopped (0:00:00)

我可以看到错误,但我不知道如何解决。我已经搜索过,但(显然(没有找到解决方案。运行 yii 队列/运行队列表后,队列表被清除,因此队列似乎正在工作......但不下载任何文件。

我已经检查了文件夹的权限,它具有写入权限。

有人有什么想法吗?

看起来像这个错误。它已经在 master 中修复,但尚未发布。在版本2.1.1发布之前,您可以使用 master 分支。

composer require yiisoft/yii2-queue:dev-master

最新更新