-
-
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
[Subscriptions] Queue "new post" email #1869
Comments
I've read both the #978 issue and PR conversation as well as the code(multiple times) and still wondering what's the idea of this? Why just not using the original laravel queuing system? Would've been easier to just have a configuration of what queue type to be used. If the shared hosting doesn't support background workers, the config can remain Am I missing something that I can't explain myself or... ? |
We are actually using the Laravel Queue, but without any configs (per se). What Flarum relies on more heavily is the ability to replace bindings in the service container. There are several reasons for this:
I used to be skeptic too, mind you, but I think doing it like this makes sense for a product like Flarum. Here's an example how I am implementing a Redis based Queue (I need it for the horizon extension to work): |
I guess I am missing some internal knowledge about Laravel and components and makes me confused of what is going on. I need to dig a bit longer to get better understanding of the internals but I will still be happy to try and work on this so I can get deeper understanding of Flarum as well. Anyone else could work on this as well. I am taking this mostly for learning purposes. @luceos is your Redis approach going to be implemented in Flarum? |
AFAIK, bokt/flarum-redis is the current playground for what will probably move into core. As @luceos already explained, there is not much gain in offering all the adapters and functionalities that Laravel brings to the table in Flarum. We mostly use Laravel (its components, really) as a library, not so much as a framework. Laravel wants to offer a lot to many different types of applications; we have very specific requirements and goals, thus we don't need it all. My current vision is for Flarum to support a fallback and a "real" driver for queueing. The latter will probably be based on Laravel's Redis queue. |
Relates to #978.
A nice first use-case for playing around with our new queueing support (#1773).
new_post
email via queue (which uses thesync
driver by default, so this should not change behavior).Once this is implemented, we can start showcasing this to extension developers, and tackle other tasks in the system that could benefit from being offloaded to the queue.
The text was updated successfully, but these errors were encountered: