2019-05-02 18:17:27 -04:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
2018-05-04 18:31:48 -04:00
|
|
|
module Jobs
|
2019-10-02 00:01:53 -04:00
|
|
|
class SendPushNotification < ::Jobs::Base
|
2018-05-04 18:31:48 -04:00
|
|
|
def execute(args)
|
2018-05-17 03:22:01 -04:00
|
|
|
user = User.find_by(id: args[:user_id])
|
|
|
|
PushNotificationPusher.push(user, args[:payload]) if user
|
2018-05-04 18:31:48 -04:00
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|