A
A
Alex Wells2017-08-13 18:05:08
Laravel
Alex Wells, 2017-08-13 18:05:08

Why ShouldBroadcastNow fire through a queue?

Hello. There is event broadcasting via redis in socketcluster and also two events:

class MessageCreatedEvent implements ShouldBroadcastNow {}
class MessageUpdatedEvent implements ShouldBroadcastNow {}

The first one is called directly at the request of the user, the second - when processing the job from the queue.
Why then the first event, as it should, does not get into the queue, but the second one does?
No special settings or methods. Both are called via the event(new Event()) helper, both have the same traits. The config is cached. Both queues and broadcasting use redis as a driver.

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question