简体   繁体   English

laravel artisan :: queue失败但不在控制台中

[英]laravel artisan::queue fails but not in console

Hi I have a very simple console command that copies some images, 嗨,我有一个非常简单的控制台命令,可以复制一些图像,

Using the following console comand works with no problem 使用以下控制台命令可以正常工作

 php artisan revo:copyPhotos baseTenant destination

However when calling this from php code with artisan::queue it fails 但是,当使用artisan::queue从php代码调用此函数时,它将失败

I get this error in the failed_jobs table 我在failed_jobs表中收到此错误

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

And I'm calling it this way from php 我从php这种方式称呼它

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

The command signature: 命令签名:

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

I'm using queues with beanstalkd and other queue jobs work without any problem (extending job not command ), 我正在使用带有beantalkd的队列,并且其他队列作业正常工作(扩展job not command ),

Any idea if I'm missing anything? 我有什么想念的吗? nothing appears on the storage/logs file for that failed job.. 该失败作业的storage/logs文件上没有任何内容。

Ok... I found I needed to call 好吧...我发现我需要打电话

php artisan queue:restart

So the queue deamon got aware of the new code 因此队列守护进程知道了新代码

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM