N
N
Nikita Dergachov2017-07-21 16:27:23
Laravel
Nikita Dergachov, 2017-07-21 16:27:23

How to start a separate listener for a queue?

Good afternoon. I have 2 types of queue, one sends emails, the other push notifications. I use a database as a driver.

$job = (new SendReminderEmail($user))->onQueue('emails');
$this->dispatch($job)

To process the queue, use the command
php artisan queue:work database--daemon --sleep=3 --tries=3

How do I create a separate handler for email and push notifications?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
J
JhaoDa, 2017-07-21
@vanillathunder

Doc on Queues, section "Specifying The Connection & Queue".

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question