Laravel 队列驱动程序没有在作业上调用 handle(),但 queue:listen 守护进程将作业记录为已处理

Hol*_*ant 6 php queue laravel forge server

我已经接管了一个Laravel 5.2项目,该项目handle()sync队列驱动程序成功调用。

我需要的驱动程序支持dispatch(..)->delay(..),并试图同时配置databasebeanstalkd,有许多变化,失败-handle()不再是获取调用。

当前设置

我正在使用 Forge 进行服务器管理,并为此命令设置了一个守护程序,该守护程序由 Supervisor 自动保持运行:

php /home/forge/my.domain.com/envoyer/current/ artisan queue:listen --sleep=3 --tries=3

我也试过 queue:work,命名为 'database/beanstalkd',有和没有指定 --sleep, --tries , --deamon

我有一个活跃的 beanstalkd 工人在 forge 上运行

我在 Envoyer中将默认驱动程序设置为beanstalkdin\config\queue.phpQUEUE_DRIVER=beanstalkdin my .envfrom,这对其他环境变量工作正常。

构建部署后,Envoyer 成功运行以下命令:

php artisan config:clear
php artisan migrate
php artisan cache:clear
php artisan queue:restart
Run Code Online (Sandbox Code Playgroud)

调试信息

我的queue:listen守护进程在 .forge 中生成日志说它处理了一项工作!

[2017-07-04 08:59:13] 处理:App\Jobs\GenerateRailwayReport

该作业类的定义如下:

class GenerateRailwayReport extends Job implements ShouldQueue
{
    use InteractsWithQueue, SerializesModels;
    protected $task_id;

    public function __construct($task_id)
    {
        $this->task_id = $task_id;
        clock("GenerateRailwayReport constructed"); // Logs Fine
    }

    public function handle()
    {
        clock("Handling Generation of railway report"); // Never Logs
        //Bunch of stuff all commented out during my testing
    }

    public function failed(Exception $e)
    {
        clock("Task failed with exception:"); // Never Logs
        clock($e);
    }
}
Run Code Online (Sandbox Code Playgroud)

我在 .forge 中的 beanstalkd 工作日志中没有输出

我的 failed_jobs 表中没有任何内容。

- 真的,非常感谢此时的任何帮助!