lib/ring/sqa/database.rb in ring-sqa-0.3.0 vs lib/ring/sqa/database.rb in ring-sqa-0.3.1

- old
+ new

@@ -7,11 +7,12 @@ class Database def add record record[:time] = Time.now.utc.to_i record[:latency] = nil record[:result] = 'no response' - Log.debug "adding '#{record}' to database" if CFG.debug? - Ping.new(record).save + ping = Ping.new(record).save + Log.debug "added '#{record}' to database with id #{ping.id}" if CFG.debug? + return ping end def update record_id, result, latency=nil if record = Ping[record_id] Log.debug "updating record_id '#{record_id}' with result '#{result}' and latency '#{latency}'" if CFG.debug?