Class: Rpush::Daemon::Wpns::Delivery
- Defined in:
- lib/rpush/daemon/wpns/delivery.rb
Overview
Constant Summary collapse
- FAILURE_MESSAGES =
{ 400 => 'Bad XML or malformed notification URI.', 401 => 'Unauthorized to send a notification to this app.' }
Instance Method Summary collapse
-
#initialize(app, http, notification, batch) ⇒ Delivery
constructor
A new instance of Delivery.
- #perform ⇒ Object
Methods inherited from Delivery
#mark_delivered, #mark_failed, #mark_retryable, #mark_retryable_exponential
Methods included from Loggable
#log_error, #log_info, #log_warn
Methods included from Reflectable
Constructor Details
#initialize(app, http, notification, batch) ⇒ Delivery
Returns a new instance of Delivery.
13 14 15 16 17 18 |
# File 'lib/rpush/daemon/wpns/delivery.rb', line 13 def initialize(app, http, notification, batch) @app = app @http = http @notification = notification @batch = batch end |
Instance Method Details
#perform ⇒ Object
20 21 22 23 24 25 26 27 |
# File 'lib/rpush/daemon/wpns/delivery.rb', line 20 def perform begin handle_response(do_post) rescue Rpush::DeliveryError => error mark_failed(error.code, error.description) raise end end |