Sha256: 8d8be98b787c2840f352eaa4dd596a90cda1da1e672e4c0d3e5ec6cfd9b29724

Contents?: true

Size: 459 Bytes

Versions: 1

Compression:

Stored size: 459 Bytes

Contents

module Waffle
  module Transports
    class Base
      def initialize
        connect!
      end

      def ready_to_connect?
        (Time.now - @last_connection_attempt) > Waffle.config.connection_attempt_timeout
      end

      def reconnect
        connect!
      end

      protected
      def connect!
        @last_connection_attempt = Time.now
        do_connect
      rescue
        false
      end

      def do_connect
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
waffle-0.4.0 lib/waffle/transports/base.rb