[Groonga-commit] droonga/express-droonga at 152c392 [master] Detect "no engine found" error

Back to archive index

YUKI Hiroshi null+****@clear*****
Wed Apr 29 15:52:54 JST 2015


YUKI Hiroshi	2015-04-29 15:52:54 +0900 (Wed, 29 Apr 2015)

  New Revision: 152c392a7f4662585dc41cd8abdfc3c75f07db00
  https://github.com/droonga/express-droonga/commit/152c392a7f4662585dc41cd8abdfc3c75f07db00

  Message:
    Detect "no engine found" error

  Modified files:
    lib/droonga-protocol/connection-pool.js

  Modified: lib/droonga-protocol/connection-pool.js (+2 -0)
===================================================================
--- lib/droonga-protocol/connection-pool.js    2015-04-29 15:48:11 +0900 (47d57c4)
+++ lib/droonga-protocol/connection-pool.js    2015-04-29 15:52:54 +0900 (ce2fdce)
@@ -214,6 +214,8 @@ ConnectionPool.prototype = {
     this.updating = true;
     return this.getEnginesFromCluster()
                  .then((function(engines) {
+                   if (engines.length == 0)
+                     throw new Error('no engine found from cluster');
                    this.clusterId = engines[0].Tags.cluster_id;
                    var hostNames = engines.map(function(engine) {
                      return engine.HostName;
-------------- next part --------------
HTML����������������������������...
Download 



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