I was wondering if someone could help me to understand the Laravel 4 queue system.
I want to use it for background processing of CSV files, so that the user can upload the CSV file and continue using the system while the CSV is doing what it needs to do in the background, but it doesnt seem to be working.
In my controller i have the following:
// Push the import into the queue
Queue::push('QueueController@importCSV', array('filename' => $filename, 'fileext' => $fileExt));
// Everything sorted, return success
return Response::json('success', 200);
In my QueueController is all the logic to import the CSV data.
My problem is that when i push to the queue using the above code, it waits for that import to finish until it returns the response, as the CSV's are quite large, it will take minutes before i get the success response.
I thought if you push something to the queue, it does it in the background while the user continues using the system.
Could someone tell me where im going wrong and maybe help out with what i need to do.
Cheers,