dongyijing2353 2015-01-10 10:40
浏览 158
已采纳

Laravel Queue正在重复使用beanstalkd和redis

I'm using laravel Queues with beanstalkd driver ( same thing happened with redis ), when i push a Queue it just keeps repeating

What i did simply is:

  1. Install beanstalkd , run beanstalkd
  2. Run php artisan queue:listen
  3. In the terminal window of queue listen , it just keeps repeating after every few seconds: Processed: SendEmail

I thought the queue wasn't empty, so tried flushing it out ( it was empty ), failed jobs table is empty.

Second test , stopped beanstlkd and queue listen , i have a controller that simply says:

..
Queue::push('SendEmail@fire', array('message' => $msg->id));

There's no loops in the controller at all, nor in the send email function

  • 写回答

1条回答 默认 最新

  • doukuangxun5382 2015-01-10 12:08
    关注

    you need to delete job at end of SendEmail@fire

    Class SendMail {
        public function fire($job, $data){
            ///...
            $job->delete();
        }
    }
    
    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥30 求一段fortran代码用IVF编译运行的结果
  • ¥15 深度学习根据CNN网络模型,搭建BP模型并训练MNIST数据集
  • ¥15 lammps拉伸应力应变曲线分析
  • ¥15 C++ 头文件/宏冲突问题解决
  • ¥15 用comsol模拟大气湍流通过底部加热(温度不同)的腔体
  • ¥50 安卓adb backup备份子用户应用数据失败
  • ¥20 有人能用聚类分析帮我分析一下文本内容嘛
  • ¥15 请问Lammps做复合材料拉伸模拟,应力应变曲线问题
  • ¥30 python代码,帮调试,帮帮忙吧
  • ¥15 #MATLAB仿真#车辆换道路径规划