Sha256: 1775adbbf7a498c88e1dc661709c8d1af2924bf56f20caf0eab0b944d2b3b0db

Contents?: true

Size: 514 Bytes

Versions: 5

Compression:

Stored size: 514 Bytes

Contents

module APN::Jobs
  # This is the class that's actually enqueued via Resque when user calls +APN.notify+.
  # It gets added to the +apple_server_notifications+ Resque queue, which should only be operated on by
  # workers of the +APN::Sender+ class.
  class ResqueNotificationJob

    # Behind the scenes, this is the name of our Resque queue
    @queue = QUEUE_NAME

    # Build a notification from arguments and send to Apple
    def self.perform(token, opts)
      APN.notify_sync(token, opts)
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
apn_sender-2.1.1 lib/apn/jobs/resque_notification_job.rb
apn_sender-2.1.0 lib/apn/jobs/resque_notification_job.rb
apn_sender-2.0.2 lib/apn/jobs/resque_notification_job.rb
apn_sender-2.0.1 lib/apn/jobs/resque_notification_job.rb
apn_sender-2.0.0 lib/apn/jobs/resque_notification_job.rb