lundi 28 septembre 2015

Command bus not going asynchronous

I made use of laravel 5.1 Command bus to run a specific task (upload a file, validate then record it in my db) on a background process. I tried uploading small csv file like 1.4kb (40 rows) and it worked. But when i tried uploading a 1MB csv file (20000 rows) i noticed it is not running in background process, it wait for the job to be finish then load the correct page which is not the way I wanted it :(. I think I followed the laravel documentation on how to run a command bus in asynchronous process just by php artisan make:command PurchasePodcast --queued.

Reference: http://ift.tt/16ov7Mw

My code

class ImportPricelistCommand extends Command implements SelfHandling, ShouldQueue
{
    use InteractsWithQueue, SerializesModels;

Am i missing something? Please help.



from Newest questions tagged laravel-5 - Stack Overflow http://ift.tt/1h5CwWn
via IFTTT

Aucun commentaire:

Enregistrer un commentaire