Reputation: 1404
I have a file upload form where an image is being uploaded first to my server and then to Imgur. The upload to Imgur is supposed to be queued. So, once a new file is uploaded, I do a push:
Queue::push('JobController@someJob',['v1'=>'something','v2'=>'something']);
I used this to subscribe to the queue:
php artisan queue:subscribe name http://url
Now, I can see that this is working because I can see the subscription in IronMQ
However, when I do an upload, the image uploads fine in my server and shows no error. But there are no message sent to IronMQ:
Thus, those Imgur uploads are not happening either. I have tested everything and searched extensively, I haven't found any solutions to this yet. Any idea whats happening?
Upvotes: 2
Views: 115
Reputation: 1404
Found the issue:
I was stupidly calling Queue::push (...)
after I had already done return Response::json('done',200)
.
Since the function ends in return the queue was not being called.
Upvotes: 1