[Groonga-commit] droonga/fluent-plugin-droonga at 7a40958 [master] Stop returning error.

Back to archive index

Daijiro MORI null+****@clear*****
Thu Sep 19 20:31:03 JST 2013


Daijiro MORI	2013-09-19 20:31:03 +0900 (Thu, 19 Sep 2013)

  New Revision: 7a409588da71072999a4a6b001f75afbd03bf0e9
  https://github.com/droonga/fluent-plugin-droonga/commit/7a409588da71072999a4a6b001f75afbd03bf0e9

  Message:
    Stop returning error.

  Modified files:
    lib/droonga/plugin/adapter/groonga/select.rb

  Modified: lib/droonga/plugin/adapter/groonga/select.rb (+8 -4)
===================================================================
--- lib/droonga/plugin/adapter/groonga/select.rb    2013-09-19 20:25:15 +0900 (7e5457a)
+++ lib/droonga/plugin/adapter/groonga/select.rb    2013-09-19 20:31:03 +0900 (8f0f198)
@@ -60,11 +60,15 @@ module Droonga
           status_code = 0
 
           start_time = value["startTime"]
-          start_time_in_unix_time = Time.parse(start_time).to_f
-          elapsed_time = value["elapsedTime"]
+          start_time_in_unix_time = if start_time
+                                      Time.parse(start_time).to_f
+                                    else
+                                      Time.now.to_f
+                                    end
+          elapsed_time = value["elapsedTime"] || 0
           count = value["count"]
 
-          attributes = value["attributes"]
+          attributes = value["attributes"] || []
           converted_attributes = attributes.collect do |attribute|
             name = attribute["name"]
             type = attribute["type"]
@@ -72,7 +76,7 @@ module Droonga
           end
 
           header = [status_code, start_time_in_unix_time, elapsed_time]
-          results = [[count], converted_attributes]
+          results = [[count], converted_attributes, value["records"]]
           body = [results]
 
           [header, body]
-------------- next part --------------
HTML����������������������������...
Download 



More information about the Groonga-commit mailing list
Back to archive index