FIX: handle missing users when sending push notifications
This commit is contained in:
parent
17a7bb8e23
commit
238a13643d
|
@ -1,8 +1,8 @@
|
|||
module Jobs
|
||||
class SendPushNotification < Jobs::Base
|
||||
def execute(args)
|
||||
user = User.find(args[:user_id])
|
||||
PushNotificationPusher.push(user, args[:payload])
|
||||
user = User.find_by(id: args[:user_id])
|
||||
PushNotificationPusher.push(user, args[:payload]) if user
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue