Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ShouldQueue and Queueable in Listeners #18339

Closed
mbpcoder opened this issue Mar 14, 2017 · 5 comments
Closed

ShouldQueue and Queueable in Listeners #18339

mbpcoder opened this issue Mar 14, 2017 · 5 comments

Comments

@mbpcoder
Copy link

mbpcoder commented Mar 14, 2017

  • Laravel Version: 5.3
  • PHP Version: 7.1
  • Redis Queue

Description:

Hello to everyone.
I have an event with several Listeners. The ShouldQueue interface work well on Listeners, but the listeners can't work with Queueable trait (delay, different queue), is this a bug or a feature?

I know that I can use jobs for delaying. But in my perspective, every class that allows to implement ShouldQueue should also work with Queueable (the ability to be delayed).

@Kyslik
Copy link
Contributor

Kyslik commented Mar 15, 2017

Is this the case? #18235

@sisve
Copy link
Contributor

sisve commented Mar 16, 2017

The linked issue is about moving scheduled jobs to the queue, not event listeners.

Actual related issue: #18199

@mbpcoder
Copy link
Author

Sorry I didn't find the issue before.
Thanks @sisve
It would be good to have this feature.

@themsaid
Copy link
Member

Queueable can be used while dispatching a job since you have access to the job object to call Queueable's methods on, but listeners are created internally.

I Just submitted a PR that should add the functionality #18375

@mbpcoder
Copy link
Author

Thanks, @themsaid

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants