[Groonga-commit] droonga/express-droonga at 773e922 [master] Use self-hosting Serf agent as the RPC node if possible

Back to archive index

YUKI Hiroshi null+****@clear*****
Wed Nov 5 12:21:35 JST 2014


YUKI Hiroshi	2014-11-05 12:21:35 +0900 (Wed, 05 Nov 2014)

  New Revision: 773e92226b02300e8222000c8f8845e5b00ec24a
  https://github.com/droonga/express-droonga/commit/773e92226b02300e8222000c8f8845e5b00ec24a

  Message:
    Use self-hosting Serf agent as the RPC node if possible

  Modified files:
    bin/express-droonga-report-live-engine-hosts
    lib/droonga-protocol/connection-pool.js
    lib/serf/options.js

  Modified: bin/express-droonga-report-live-engine-hosts (+1 -1)
===================================================================
--- bin/express-droonga-report-live-engine-hosts    2014-11-05 12:21:10 +0900 (8df0c0c)
+++ bin/express-droonga-report-live-engine-hosts    2014-11-05 12:21:35 +0900 (8f54b7f)
@@ -6,7 +6,7 @@ var options = require('../lib/serf/options');
 options = options.define().parse(process.argv);
 
 var client = new SerfClient({
-  host:       options.droongaEngineHostName,
+  host:       options.rpcHostName,
   enginePort: options.droongaEnginePort,
   tag:        options.tag
 });

  Modified: lib/droonga-protocol/connection-pool.js (+4 -1)
===================================================================
--- lib/droonga-protocol/connection-pool.js    2014-11-05 12:21:10 +0900 (e3cc6a1)
+++ lib/droonga-protocol/connection-pool.js    2014-11-05 12:21:35 +0900 (1e13cd6)
@@ -149,9 +149,12 @@ ConnectionPool.prototype = {
       // we should use it in a separate expendable process.
       var commandPath = path.join(__dirname, '..', '..', 'bin',
                           'express-droonga-report-live-engine-hosts');
+      var hostName = this._hostNames[0];
+      if (this._watching)
+        hostName = this._params.receiveHostName;
       var commandLine = [
         commandPath,
-          '--droonga-engine-host-name=' + this._hostNames[0],
+          '--rpc-host-name=' + hostName,
           '--droonga-engine-port=' + this._params.port,
           '--tag=' + this._params.tag
       ].join(' ');

  Modified: lib/serf/options.js (+5 -5)
===================================================================
--- lib/serf/options.js    2014-11-05 12:21:10 +0900 (5109433)
+++ lib/serf/options.js    2014-11-05 12:21:35 +0900 (dcc625e)
@@ -1,8 +1,8 @@
 var options = require('commander');
 
-options.droongaEngineHostName = '127.0.0.1';
-options.droongaEnginePort     = 10031;
-options.tag                   = 'droonga';
+options.rpcHostName       = '127.0.0.1';
+options.droongaEnginePort = 10031;
+options.tag               = 'droonga';
 
 function intOption(newValue, oldValue) {
   return parseInt(newValue);
@@ -25,8 +25,8 @@ function add() {
 exports.add = add;
 
 function define() {
-  add('--droonga-engine-host-name <name>',
-      'Host name of Droonga engine (' + options.droongaEngineHostName + ')');
+  add('--rpc-host-name <name>',
+      'Host name of the node Serf agent is running on (' + options.rpcHostName + ')');
   add('--droonga-engine-port <port>',
       'Port number of Droonga engine (' + options.droongaEnginePort + ')',
       intOption);
-------------- next part --------------
HTML����������������������������...
下載 



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