Browse Source

Improve a query in WebPushNotificationWorker (#4234)

pull/4/head
Akihiko Odaki 6 years ago
committed by Eugen Rochko
parent
commit
7f35947d8e
1 changed files with 1 additions and 1 deletions
  1. +1
    -1
      app/workers/web_push_notification_worker.rb

+ 1
- 1
app/workers/web_push_notification_worker.rb View File

@ -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…
Cancel
Save