Queue onConnection

Posted: 2016-11-14 16:36:52

If you look here https://laravel.com/docs/5.3/queues#customizing-the-queue-and-connection

Under "Dispatching To A Particular Connection"

But if running test and local where I just want sync or database

            if(env('QUEUE_DRIVER') != 'sync' && env('QUEUE_DRIVER') != 'database') {
                $concentration_curve = (new ImportDataColumnWorker($this->job_notice->model, $this->job_notice->payload))
                    ->onConnection('columns');
            } else {
                $concentration_curve = (new ImportDataColumnWorker($this->job_notice->model, $this->job_notice->payload));
            }


            $this->dispatch($concentration_curve);