Improve a query in WebPushNotificationWorker (#4234)
parent
71a02eb2d9
commit
6eff4496e3
|
@ -9,7 +9,7 @@ class WebPushNotificationWorker
|
|||
recipient = Account.find(recipient_id)
|
||||
notification = Notification.find(notification_id)
|
||||
|
||||
sessions_with_subscriptions = recipient.user.session_activations.reject { |session| session.web_push_subscription.nil? }
|
||||
sessions_with_subscriptions = recipient.user.session_activations.where.not(web_push_subscription: nil)
|
||||
|
||||
sessions_with_subscriptions.each do |session|
|
||||
begin
|
||||
|
|
Loading…
Reference in New Issue