sneaker icon indicating copy to clipboard operation
sneaker copied to clipboard

ExceptionMailer by default implements SchouldQueue

Open LKnulp opened this issue 6 years ago • 4 comments

Hi there,

I had some trouble with my laravel 5.8 sending no emails anymore. That was pretty strange because a day before every mail was sent successfully. Finally I noticed, that the ExceptionMailer-class of this package as well as my own mailable-classes implemented the ShouldQueue-interface. In the meantime, while I was included the sneaker-package, I also setted up the queue in my project. Doing so, every mail was submitted to the queue without any hint for me that it will not be sent. There is no queue worker setted up yet.

My question is: Even if I set up a queue worker to process the queued emails, how can I specify on wich queue they are submitted? Currently they are all put on the "default"-queue. I don't want to run in trouble because a specific queue worker cannot process different entities on the "default"-queue. A change of the package-vendor-code would be my last resort but maybe you have another idea or prepared feature. I would really appreciate any hints on this issue. Thanks!

LKnulp avatar Jul 10 '19 22:07 LKnulp

Right now sneaker doesn't support for providing different queue but this is the feature I would like to see in the package. I will try to work upon it on weekends meanwhile you can also submit a PR for this which is really appreciated.

N also if you dont want to use queues in your project then you can set queue_driver=sync in your .env file.

akaamitgupta avatar Jul 11 '19 00:07 akaamitgupta

Thanks for your fast solution. Unfortunately making my queue "sync" is not an option because I need the background functionality of the queue for other jobs. I ended up removing the "ShouldQueue"-Interface from the ExceptionMail-Mailable.

Maybe it would an idea to couple the functionality of specifying a queue-channel with switching between a queueable mail and an ordinary one. You could inherit two new mailables from the current base-mailable (without interface) and just put the interface on one of those new ones.

Otherwise maybe you can make the default mailable interchangeable with one of the users ones. But I cant evaluate how complicate it would be to still use the view assests of the package from a complete different namespace.

Thanks for your work and have a nice day :)

Am Do., 11. Juli 2019 um 02:46 Uhr schrieb Amit Gupta < [email protected]>:

Right now sneaker doesn't support for providing different queue but this is the feature I would like to see in the package. I will try to work upon it on weekends meanwhile you can also submit a PR for this which is really appreciated.

N also if you dont want to use queues in your project then you can set queue_driver=sync in your .env file.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/squareboat/sneaker/issues/35?email_source=notifications&email_token=ADJLSVTW3QRMFKKPNI6WDZ3P6Z7FRA5CNFSM4IAANOS2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODZVET6Y#issuecomment-510282235, or mute the thread https://github.com/notifications/unsubscribe-auth/ADJLSVVNJDXEVA7M5ONFAK3P6Z7FRANCNFSM4IAANOSQ .

LKnulp avatar Jul 11 '19 14:07 LKnulp

Hi there,

I was working on a PR as I saw that I cant push a new branch with my changes. Actually I have to confess that I'm not familiar with PRs.

How could you get my suggestions?

Am Do., 11. Juli 2019 um 16:23 Uhr schrieb Leonhard Kämmerer < [email protected]>:

Thanks for your fast solution. Unfortunately making my queue "sync" is not an option because I need the background functionality of the queue for other jobs. I ended up removing the "ShouldQueue"-Interface from the ExceptionMail-Mailable.

May it is an ide to couple the functionality of specifing a queue-channel with switching between a queueable mail and an ordinary one. You could inherit two new mailables from the current base-mailable (without interface) and just put the interface on one of those new ones.

Otherwise maybe you can make the default mailable interchangeable with one of the users ones. But I cant evaluate how complicate it would be to still use the view assests of the package from a complete different namespace.

Thanks for your work and have a nice day :)

Am Do., 11. Juli 2019 um 02:46 Uhr schrieb Amit Gupta < [email protected]>:

Right now sneaker doesn't support for providing different queue but this is the feature I would like to see in the package. I will try to work upon it on weekends meanwhile you can also submit a PR for this which is really appreciated.

N also if you dont want to use queues in your project then you can set queue_driver=sync in your .env file.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/squareboat/sneaker/issues/35?email_source=notifications&email_token=ADJLSVTW3QRMFKKPNI6WDZ3P6Z7FRA5CNFSM4IAANOS2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODZVET6Y#issuecomment-510282235, or mute the thread https://github.com/notifications/unsubscribe-auth/ADJLSVVNJDXEVA7M5ONFAK3P6Z7FRANCNFSM4IAANOSQ .

LKnulp avatar Jul 11 '19 20:07 LKnulp

Thanks for the PR. Please follow following link to submit the PR.

https://help.github.com/en/articles/creating-a-pull-request-from-a-fork

akaamitgupta avatar Jul 12 '19 03:07 akaamitgupta