class Rpush::Daemon::Dispatcher::Http
Public Class Methods
new(app, delivery_class, _options = {})
click to toggle source
# File lib/rpush/daemon/dispatcher/http.rb, line 5 def initialize(app, delivery_class, _options = {}) @app = app @delivery_class = delivery_class @http = Net::HTTP::Persistent.new(name: 'rpush') end
Public Instance Methods
cleanup()
click to toggle source
# File lib/rpush/daemon/dispatcher/http.rb, line 15 def cleanup @http.shutdown end
dispatch(payload)
click to toggle source
# File lib/rpush/daemon/dispatcher/http.rb, line 11 def dispatch(payload) @delivery_class.new(@app, @http, payload.notification, payload.batch).perform end