doujingqu3030 2017-07-04 11:44
浏览 153

Laravel Queue驱动程序不在作业上调用handle(),但是队列:listen守护程序正在将作业记录为已处理

I've taken over a Laravel 5.2 project where handle() was being called successfully with the sync queue driver.

I need a driver that supports dispatch(..)->delay(..) and have attempted to configure both database and beanstalkd, with numerous variations, unsuccessfully - handle() is no longer getting called.

Current setup

I am using Forge for server management and have set up a daemon, which is automatically kept running by Supervisor, for this command:

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

I've also tried queue:work, naming 'database/beanstalkd', with and without specifying --sleep, --tries , --deamon

I have an active beanstalkd worker running on forge.

I have set the default driver to beanstalkd in \config\queue.php and QUEUE_DRIVER=beanstalkd in my .env from within Envoyer, which has worked fine for other environment variables.

After build deployment Envoyer runs the following commands successfully:

php artisan config:clear
php artisan migrate
php artisan cache:clear
php artisan queue:restart

Debug information

My queue:listen daemon produces log within .forge says it processed a job!

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

Where that job class is defined like this:

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);
    }
}

My beanstalkd worker log within .forge has no output in it.

Nothing in my failed_jobs table.

-Really, really appreciate any help at this point!

  • 写回答

0条回答 默认 最新

    报告相同问题?

    悬赏问题

    • ¥15 关于#matlab#的问题:期望的系统闭环传递函数为G(s)=wn^2/s^2+2¢wn+wn^2阻尼系数¢=0.707,使系统具有较小的超调量
    • ¥15 FLUENT如何实现在堆积颗粒的上表面加载高斯热源
    • ¥30 截图中的mathematics程序转换成matlab
    • ¥15 动力学代码报错,维度不匹配
    • ¥15 Power query添加列问题
    • ¥50 Kubernetes&Fission&Eleasticsearch
    • ¥15 報錯:Person is not mapped,如何解決?
    • ¥15 c++头文件不能识别CDialog
    • ¥15 Excel发现不可读取的内容
    • ¥15 关于#stm32#的问题:CANOpen的PDO同步传输问题