Sha256: 7f86e2a98eeea7ae1317516541dbf5a4e1e2204ba8475a282182cf9671b08b6e

Contents?: true

Size: 622 Bytes

Versions: 5

Compression:

Stored size: 622 Bytes

Contents

module Chillout
  class Dispatcher
    class SendCreationsFailed < StandardError
    end

    def initialize(server_side)
      @server_side = server_side
    end

    def send_creations(creations)
      @server_side.send_creations(creations)
    rescue HttpClient::NotSent
      raise SendCreationsFailed.new
    end

    def check_api_connection
      response = @server_side.send_check
      CheckResult.new(response)
    rescue HttpClient::NotReceived => e
      CheckResult.new(e)
    end

    def send_startup_message
      @server_side.send_startup_message
    rescue HttpClient::NotReceived => e
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
chillout-0.6.0 lib/chillout/server_side/dispatcher.rb
chillout-0.5.4 lib/chillout/server_side/dispatcher.rb
chillout-0.5.3 lib/chillout/server-side/dispatcher.rb
chillout-0.5.2 lib/chillout/server-side/dispatcher.rb
chillout-0.5.1 lib/chillout/server-side/dispatcher.rb