Sha256: 85be8d8c81a1f74e37363747605db26f6699d4a7fe797f32ea01547a6cdf0177

Contents?: true

Size: 468 Bytes

Versions: 2

Compression:

Stored size: 468 Bytes

Contents

module Rpush
  module Daemon
    module Dispatcher
      class Http
        def initialize(app, delivery_class, options = {})
          @app = app
          @delivery_class = delivery_class
          @http = Net::HTTP::Persistent.new('rpush')
        end

        def dispatch(notification, batch)
          @delivery_class.new(@app, @http, notification, batch).perform
        end

        def cleanup
          @http.shutdown
        end
      end
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
rpush-1.0.0-java lib/rpush/daemon/dispatcher/http.rb
rpush-1.0.0 lib/rpush/daemon/dispatcher/http.rb