Kouhei Sutou
null+****@clear*****
Fri Apr 21 12:34:45 JST 2017
Kouhei Sutou 2017-04-21 12:34:45 +0900 (Fri, 21 Apr 2017) New Revision: c92dab27b549c2ac02d01cfb806d96adbdc9a3ab https://github.com/groonga/groonga-query-log/commit/c92dab27b549c2ac02d01cfb806d96adbdc9a3ab Message: server-verifier: simplify Modified files: lib/groonga/query-log/server-verifier.rb Modified: lib/groonga/query-log/server-verifier.rb (+14 -7) =================================================================== --- lib/groonga/query-log/server-verifier.rb 2017-04-21 11:29:18 +0900 (0509161) +++ lib/groonga/query-log/server-verifier.rb 2017-04-21 12:34:45 +0900 (3b1b17c) @@ -73,18 +73,28 @@ module Groonga loop do statistic =****@queue***** return true if statistic.nil? + + original_source = statistic.command.original_source begin verify_command(groonga1_client, groonga2_client, statistic.command) - - verify_command(groonga1_client, groonga2_client, - Groonga::Command::Status.new) rescue log_client_error($!) do - $stderr.puts(statistic.command.original_source) + $stderr.puts(original_source) end return false end + if****@optio*****_cache? + begin + verify_command(groonga1_client, groonga2_client, + Groonga::Command::Status.new) + rescue + log_client_error($!) do + $stderr.puts("status after #{original_source}") + end + return false + end + end end end end @@ -107,9 +117,6 @@ module Groonga end def verify_command(groonga1_client, groonga2_client, command) - if command.instance_of?(Groonga::Command::Status) - return unles****@optio*****_cache? - end command["cache"] = "no" if****@optio*****_cache? command["output_type"] = :json response1 = groonga1_client.execute(command) -------------- next part -------------- HTML����������������������������... Download