[Groonga-commit] droonga/droonga-engine at f67be47 [master] Give EngineState to HandlerMessenger

Back to archive index

YUKI Hiroshi null+****@clear*****
Thu Jun 26 11:58:33 JST 2014


YUKI Hiroshi	2014-06-26 11:58:33 +0900 (Thu, 26 Jun 2014)

  New Revision: f67be47a741fac8471991bcbe512f2f87dc1a1da
  https://github.com/droonga/droonga-engine/commit/f67be47a741fac8471991bcbe512f2f87dc1a1da

  Message:
    Give EngineState to HandlerMessenger

  Modified files:
    lib/droonga/dispatcher.rb
    lib/droonga/handler_messenger.rb
    lib/droonga/worker.rb

  Modified: lib/droonga/dispatcher.rb (+1 -0)
===================================================================
--- lib/droonga/dispatcher.rb    2014-06-26 11:45:18 +0900 (15b6792)
+++ lib/droonga/dispatcher.rb    2014-06-26 11:58:33 +0900 (2bfba2a)
@@ -55,6 +55,7 @@ module Droonga
       @catalog = catalog
       @adapter_runners = create_adapter_runners
       @farm = Farm.new(@engine_state.name, @catalog, @engine_state.loop,
+                       :engine_state => @engine_state,
                        :dispatcher => self,
                        :forwarder  => @forwarder)
       @collector_runners = create_collector_runners

  Modified: lib/droonga/handler_messenger.rb (+3 -2)
===================================================================
--- lib/droonga/handler_messenger.rb    2014-06-26 11:45:18 +0900 (9311ad5)
+++ lib/droonga/handler_messenger.rb    2014-06-26 11:58:33 +0900 (de88241)
@@ -18,14 +18,15 @@ require "droonga/forwarder"
 
 module Droonga
   class HandlerMessenger
-    attr_reader :database_name, :dispatcher
+    attr_reader :database_name, :dispatcher, :engine_state
 
     def initialize(forwarder, message, options={})
       @forwarder = forwarder
       @message = message
       @options = options
       @replier = Replier.new(@forwarder)
-      @dispatcher = @options[:dispatcher]
+      @dispatcher = options[:dispatcher]
+      @engine_state = options[:engine_state]
       @database_name = options[:database]
     end
 

  Modified: lib/droonga/worker.rb (+1 -0)
===================================================================
--- lib/droonga/worker.rb    2014-06-26 11:45:18 +0900 (b4a8c34)
+++ lib/droonga/worker.rb    2014-06-26 11:58:33 +0900 (4cb95ae)
@@ -25,6 +25,7 @@ module Droonga
       @forwarder = Forwarder.new(@loop)
       @handler_runner = HandlerRunner.new(@loop,
                                           config.merge(:dispatcher => nil,
+                                                       :engine_state => nil,
                                                        :forwarder => @forwarder))
       receive_socket_path = config[:job_receive_socket_path]
       @job_receiver = JobReceiver.new(@loop, receive_socket_path) do |message|
-------------- next part --------------
HTML����������������������������...
Télécharger 



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