【问题标题】:laravel artisan::queue fails but not in consolelaravel artisan::queue 失败但不在控制台中
【发布时间】:2015-12-13 17:05:49
【问题描述】:

您好,我有一个非常简单的控制台命令,可以复制一些图像,

使用以下控制台命令没有问题

 php artisan revo:copyPhotos baseTenant destination

但是,当使用 artisan::queue 从 php 代码调用它时,它会失败

我在 failed_jobs 表中收到此错误

{"job":"Illuminate\\Foundation\\Console\\QueuedJob","data":["revo:copyPhotos",{"origin":"baseTenant","destination":"testArtisan"}]}

我从php这样称呼它

Artisan::queue('revo:copyPhotos', ['origin' => 'baseTenant', 'destination' => 'testArtisan']);

命令签名:

protected $signature = 'revo:copyPhotos
                        {origin         : The tenant name of the origin account}
                        {destination    : the new account to be created as copy of origin}
                        ';

我正在使用带有 beanstalkd 的队列,其他队列作业没有任何问题(扩展 job 而不是 command),

知道我是否遗漏了什么吗?该失败作业的 storage/logs 文件上没有任何内容..

【问题讨论】:

    标签: php laravel queue jobs


    【解决方案1】:

    好的...我发现我需要打电话

    php artisan queue:restart

    所以队列守护进程知道了新代码

    【讨论】:

      猜你喜欢
      • 2016-09-07
      • 2016-09-24
      • 2016-04-10
      • 2022-06-14
      • 1970-01-01
      • 2013-05-19
      • 2016-08-09
      • 2020-03-02
      • 2018-07-31
      相关资源
      最近更新 更多