You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The reason I think this would be useful, is sometimes I want to dispatch an event and I need the listeners to run in real time (e.g. when something is run from the controller and the user needs the results). And other times I could dispatch this event and don't need the results in real time, would rather it be queued.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
It would be helpful to have a method on the listener to decide if it should be queued (or run in sync).
I initially thought that this method would do what I'm wanting: https://laravel.com/docs/8.x/events#conditionally-queueing-listeners
But that method will either queue, or not run it at all.
The reason I think this would be useful, is sometimes I want to dispatch an event and I need the listeners to run in real time (e.g. when something is run from the controller and the user needs the results). And other times I could dispatch this event and don't need the results in real time, would rather it be queued.
Beta Was this translation helpful? Give feedback.
All reactions