Method: Brine::CleaningUp::DeleteCommand#cleanup

Defined in:
lib/brine/cleaning_up.rb

#cleanupBoolean

Issue the delete based on the parameters provided during construction.

Returns:

  • (Boolean)

    Return true if a successful response is obtained, otherwise false.



53
54
55
56
57
58
59
60
61
62
63
64
# File 'lib/brine/cleaning_up.rb', line 53

def cleanup
  for _ in 1..@attempts
    begin
      resp=@client.delete(@path)
      return true if @oks.include?(resp.status)
    rescue Exception => ex
      STDERR.puts "WARNING: #{ex}"
    end
  end
  STDERR.puts "ERROR: Could not DELETE #{@path}"
  false
end