I have a push queue set up to dial quite a few phone numbers and play back a recording - a blast announcement system powered by Twilio. It takes time to iterate through each number and place the call, so I am hoping to use a push queue to speed up the navigation of the app.
I attempted to use Iron.io push queues in the past with Laravel 4 and it seems that any task that takes a while to run, or if the HTTP request was slow at first, the code within the fire()
method runs multiple times, even with $job->delete()
Here is an example of my queue handler -
class callLotsOfPeople {
public function fire($job, $data) {
// Do stuff with data, like calling lots of people.. takes time
$job->delete();
// For some reason this method can be called multiple times after a single queue push,
// resulting in multiple phone calls and angry clients
}
}