-
-
Notifications
You must be signed in to change notification settings - Fork 834
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
Use queues for sending emails #978
Comments
Yes, please. Using the Both (but probably mostly the first one) are aimed at providing a more performant "poor man's queue" system for use with e.g. shared hosts. |
@franzliedke something you might need to consider is the limitation by many shared hosts of the number of processes allowed per hosting plan/website. A common OS that implements this is CloudLinux. |
@luceos Laravel's |
Yes I understand, I was referring to the threadqueue solution @franzliedke ;) |
Gotcha, yeah, that should only be used where possible. |
That's highly experimental anyhow. |
Would like to take a shot at this if you're ok with it @flarum/core. todo
Would it be acceptable to simply call the QueueServiceProvider of the Illuminate\Queue package? |
@luceos Please do. 👍 TODO list looks great. Please create a stripped-down version of the service provider - the one from Laravel registers all the drivers in order to be as configurable as possible (and some console commands which we don't need for now). Ours should only set up the sync driver for now - at one point we will have a config flag that will be used to switch to another driver instead. The |
First implementation already sends over sync. I've extended the illuminate service provider and the QueueManager. I'll see if I can make a non-extended provider. |
Some thoughts I had:
Anything else? |
@franzliedke could you share you thoughts on the above once you have the opportunity to do so? Greatly appreciated. |
@luceos Do you still need anything here, or is the feedback in the PR enough? |
No it's fine, I'll patch it up asap. I've self assigned this issue. |
Wow I even looked into this. I think I have an idea how to move forward with this. Dispatch now in laravel is also pretty much like a sync driver.. Will give this a shot again soon, might make bokt/flarum-queue deprecated. |
Sometimes submitting a post can be slow because you have to wait for Flarum to send notification emails on the backend before it sends back the 200 OK response.
We should look at using Laravel's Queue component (or similar) to send emails asynchronously. Of course it will be optional as many shared hosts won't have the ability to run a queue worker in the background.
The text was updated successfully, but these errors were encountered: