Queue::push() not sending queues to IronMQ

122 views Asked by At

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

subscribed successfully

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:

No message shown on 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?

1

There are 1 answers

0
Yousof K. On BEST ANSWER

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.