1
votes

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

1 Answers

6
votes

you need to delete job at end of SendEmail@fire

Class SendMail {
    public function fire($job, $data){
        ///...
        $job->delete();
    }
}