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

Use a notification driver with the new channel extender #28

Merged
merged 4 commits into from
Nov 5, 2020
Merged

Use a notification driver with the new channel extender #28

merged 4 commits into from
Nov 5, 2020

Conversation

SychO9
Copy link
Member

@SychO9 SychO9 commented Nov 1, 2020

Part Of flarum/framework#2432

Hmm, do we want to create a job for it and queue it ? it used to be executed inside the SendNotificationJob job.

@askvortsov1
Copy link
Sponsor Member

askvortsov1 commented Nov 1, 2020

Hmm, do we want to create a job for it and queue it ? it used to be executed inside the SendNotificationJob job.

I'd lean towards yes on this one, but @flarum/core might disagree. Lets wait for a decision on flarum/framework#2432 first though.

@tankerkiller125
Copy link
Contributor

I'm going to say Queue it, Pretty much my personal opinion is to always queue things unless it's critical to execute immediately. Notifications of any kind in my opinion are always queueable.

@clarkwinkelmann
Copy link
Member

Queue definitely make sense. Technically we could implement NotificationDriverInterface::send to always be called from a queue in core for all notifications... But would we want that? Though I think this might create an issue if an extension actually needs to call its code without a queue.

Other question is one job per notification, or one job that loops through the users?

@SychO9
Copy link
Member Author

SychO9 commented Nov 3, 2020

Queue definitely make sense. Technically we could implement NotificationDriverInterface::send to always be called from a queue in core for all notifications... But would we want that? Though I think this might create an issue if an extension actually needs to call its code without a queue.

Yea I don't think we'd want to force it on a queue.

Other question is one job per notification, or one job that loops through the users?

I'd say one job that loops through the users.

src/PusherNotificationDriver.php Outdated Show resolved Hide resolved
@askvortsov1 askvortsov1 merged commit 80ba5fe into flarum:master Nov 5, 2020
@SychO9 SychO9 deleted the sm/notification-channel-extender branch November 5, 2020 17:13
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

Successfully merging this pull request may close these issues.

4 participants