Module: APN
- Defined in:
- lib/apn/queue_manager.rb,
lib/apn/sender.rb,
lib/apn/feedback.rb,
lib/apn/queue_name.rb,
lib/apn/notification.rb,
lib/apn/sender_daemon.rb,
lib/apn/connection/base.rb,
lib/apn/notification_job.rb,
lib/apn/before_unregister_worker_support.rb
Overview
Extending Resque to respond to the before_unregister_worker
hook. Note this requires a matching monkeypatch in the Resque::Worker class. See resque/hooks/before_unregister_worker.rb
for an example implementation
Defined Under Namespace
Modules: BeforeUnregisterSupport, Connection Classes: Config, Feedback, FeedbackItem, Notification, NotificationJob, QueueManager, Sender, SenderDaemon
Class Method Summary collapse
-
.notify(token, opts = {}) ⇒ Object
Enqueues a notification to be sent in the background via the persistent TCP socket, assuming apn_sender is running (or will be soon).
Class Method Details
.notify(token, opts = {}) ⇒ Object
Enqueues a notification to be sent in the background via the persistent TCP socket, assuming apn_sender is running (or will be soon)
7 8 9 10 |
# File 'lib/apn/queue_manager.rb', line 7 def self.notify(token, opts = {}) token = token.to_s.gsub(/\W/, '') APN::QueueManager.enqueue(APN::Config.queue_name, APN::NotificationJob, token, opts) end |