lib/is_it_working/filter.rb
def run
      status = Status.new(name)
      runner = (async ? AsyncRunner : SyncRunner).new do
        t = Time.now
        begin
          @check.call(status)
        rescue Exception => e
          status.fail("#{name} error: #{e.inspect}")
        end
        status.time = Time.now - t
      end
      runner.filter_status = status
      runner
    end
def run
      status = Status.new(name)
      runner = (async ? AsyncRunner : SyncRunner).new do
        t = Time.now
        begin
          @check.call(status)
        rescue Exception => e
          status.fail("#{name} error: #{e.inspect}")
        end
        status.time = Time.now - t
      end
      runner.filter_status = status
      runner
    end
def run status = Status . new ( name ) runner = ( async ? AsyncRunner : SyncRunner ) . new do t = Time . now begin @check . call ( status ) rescue Exception => e status . fail ( "#{name} error: #{e.inspect}" ) end status . time = Time . now - t end runner . filter_status = status runner end
Create a new filter to run a status check. The name is used for display purposes.
 Run a status the status check. This method keeps track of the time it took to run
 the check and will trap any unexpected exceptions and report them as failures.
Create a new filter to run a status check . The name is used for display purposes . Run a status the status check . This method keeps track of the time it took to run the check and will trap any unexpected exceptions and report them as failures .