wondering_coder's avatar

Command bus problem

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.

Am i missing something? Please help.

0 likes
3 replies
wondering_coder's avatar

@bobbybouwmann can i use the mysql database? or when I use the 'database' connection it already use my default database driver which is mysql?

'connections' => [

    'sync' => [
        'driver' => 'sync',
    ],

    'database' => [
        'driver' => 'database',
        'table' => 'jobs',
        'queue' => 'default',
        'expire' => 60,
    ],

Please or to participate in this conversation.