-
Notifications
You must be signed in to change notification settings - Fork 11.4k
[12.x] feat: Add ability to override SendQueuedNotifications job class #55942
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
base: 12.x
Are you sure you want to change the base?
Conversation
Signed-off-by: Kevin Ullyott <ullyott.kevin@gmail.com>
Signed-off-by: Kevin Ullyott <ullyott.kevin@gmail.com>
@@ -40,5 +40,7 @@ public function register() | ||
$this->app->alias( | ||
ChannelManager::class, FactoryContract::class | ||
); | ||
|
||
$this->app->bind(SendQueuedNotifications::class, SendQueuedNotifications::class); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You don't need to call bind()
to bind a concrete class to itself.
The container can handle it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah, right, good point. Removed.
Signed-off-by: Kevin Ullyott <ullyott.kevin@gmail.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I can't approve, but it looks good to me.
Can you describe your use case a bit more? Please mark as ready for review when done. Thanks! |
Of course. Currently, it is possible to configure different job settings, like tries, middleware, etc. for This works great per Notification, but when you want to do things globally across all Notifications in the system, it's a little less convenient. Being able to customize the base queued job used gives much more control and convenience over defaults and global changes you want to make to queued Notification sending. |
Adds the ability to bind a job to override SendQueuedNotifications in the container.
Often, folks may want to have a lot more control over the Notification sending queued job. Without this change, it is a large amount of effort and overrides to make changes to this job.