[Groonga-commit] droonga/droonga-client-ruby at 13c5c8e [master] Remove tag and time from response

Back to archive index

Kouhei Sutou null+****@clear*****
Thu Apr 10 17:21:47 JST 2014


Kouhei Sutou	2014-04-10 17:21:47 +0900 (Thu, 10 Apr 2014)

  New Revision: 13c5c8eabc47da4929560b49743428c8283b5457
  https://github.com/droonga/droonga-client-ruby/commit/13c5c8eabc47da4929560b49743428c8283b5457

  Message:
    Remove tag and time from response

  Modified files:
    lib/droonga/client/connection/droonga-protocol/coolio.rb
    lib/droonga/client/connection/droonga-protocol/thread.rb

  Modified: lib/droonga/client/connection/droonga-protocol/coolio.rb (+3 -3)
===================================================================
--- lib/droonga/client/connection/droonga-protocol/coolio.rb    2014-04-10 17:09:13 +0900 (9e4893b)
+++ lib/droonga/client/connection/droonga-protocol/coolio.rb    2014-04-10 17:21:47 +0900 (ef435ce)
@@ -117,7 +117,7 @@ module Droonga
                   request = @requests[id]
                   next if request.nil?
                   request[:received] = true
-                  request[:callback].call(fluent_message)
+                  request[:callback].call(droonga_message)
                 end
               end
               engine.on_read do |data|
@@ -163,9 +163,9 @@ module Droonga
                 response = _response
               end
             end
-            @receiver.register(id) do
+            @receiver.register(id) do |response|
               @receiver.unregister(id)
-              block.call
+              block.call(response)
             end
             request = Request.new(@receiver, id, @loop)
             if sync

  Modified: lib/droonga/client/connection/droonga-protocol/thread.rb (+3 -2)
===================================================================
--- lib/droonga/client/connection/droonga-protocol/thread.rb    2014-04-10 17:09:13 +0900 (322ff65)
+++ lib/droonga/client/connection/droonga-protocol/thread.rb    2014-04-10 17:21:47 +0900 (0d62ba2)
@@ -197,8 +197,9 @@ module Droonga
                     readable, = IO.select([client], nil, nil, 0)
                     break unless readable
                     data = client.read_nonblock(BUFFER_SIZE)
-                    unpacker.feed_each(data) do |object|
-                      yield(object)
+                    unpacker.feed_each(data) do |fluent_message|
+                      tag, time, droonga_message = fluent_message
+                      yield(droonga_message)
                     end
                   end
                   client.close
-------------- next part --------------
HTML����������������������������...
Download 



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