[Groonga-commit] groonga/express-kotoumi [master] Remove dependency injectionability for fluent sender

Back to archive index

YUKI Hiroshi null+****@clear*****
Tue Jan 29 18:31:12 JST 2013


YUKI Hiroshi	2013-01-29 18:31:12 +0900 (Tue, 29 Jan 2013)

  New Revision: d63cb8b273dc32f2e2834cb79907a2ab00fe6785
  https://github.com/groonga/express-kotoumi/commit/d63cb8b273dc32f2e2834cb79907a2ab00fe6785

  Log:
    Remove dependency injectionability for fluent sender

  Modified files:
    lib/backend/connection.js

  Modified: lib/backend/connection.js (+7 -10)
===================================================================
--- lib/backend/connection.js    2013-01-29 18:29:01 +0900 (37c9b75)
+++ lib/backend/connection.js    2013-01-29 18:31:12 +0900 (d56523e)
@@ -48,16 +48,13 @@ Connection.prototype._init = function() {
 };
 
 Connection.prototype._initSender = function(wait) {
-  this._sender = this._params.sender;
-  if (!this._params.sender) {
-    var options = { host:          this._params.hostName || DEFAULT_FLUENT_HOST_NAME,
-                    port:          this._params.port || DEFAULT_FLUENT_PORT,
-                    maxRetryCount: this._params.maxRetryCount || DEFAULT_FLUENT_MAX_RETRY_COUNT,
-                    retryDelay:    this._params.retryDelay || DEFAULT_FLUENT_RETRY_DELAY };
-    var sender = fluent.createFluentSender(this._params.tag || DEFAULT_FLUENT_TAG,
-                                           options);
-    this._sender = sender;
-  }
+  var options = { host:          this._params.hostName || DEFAULT_FLUENT_HOST_NAME,
+                  port:          this._params.port || DEFAULT_FLUENT_PORT,
+                  maxRetryCount: this._params.maxRetryCount || DEFAULT_FLUENT_MAX_RETRY_COUNT,
+                  retryDelay:    this._params.retryDelay || DEFAULT_FLUENT_RETRY_DELAY };
+  var sender = fluent.createFluentSender(this._params.tag || DEFAULT_FLUENT_TAG,
+                                         options);
+  this._sender = sender;
 };
 
 Connection.prototype._initReceiver = function() {
-------------- next part --------------
HTML����������������������������...
Download 



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