[Groonga-commit] droonga/express-droonga at bfc2550 [master] Indicate unit of timeout

Back to archive index

YUKI Hiroshi null+****@clear*****
Mon Apr 20 15:23:31 JST 2015


YUKI Hiroshi	2015-04-20 15:23:31 +0900 (Mon, 20 Apr 2015)

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

  Message:
    Indicate unit of timeout

  Modified files:
    lib/adapter/api/droonga.js

  Modified: lib/adapter/api/droonga.js (+3 -3)
===================================================================
--- lib/adapter/api/droonga.js    2015-04-20 15:17:12 +0900 (2b7c7f7)
+++ lib/adapter/api/droonga.js    2015-04-20 15:23:31 +0900 (c3d548c)
@@ -1,6 +1,6 @@
 var command = require('../command');
 
-var DEFAULT_TIMEOUT = 1000;
+var DEFAULT_TIMEOUT_SECONDS = 1000;
 
 function pathToMessageType(path) {
   return path
@@ -16,7 +16,7 @@ module.exports = {
     onRequest: function(request, connection) {
       var messageType = pathToMessageType(request.params[0]);
       var body = {};
-      body.timeout = body.timeout || request.query.timeout || DEFAULT_TIMEOUT;
+      body.timeout = body.timeout || request.query.timeout || DEFAULT_TIMEOUT_SECONDS;
       connection.emit(messageType, body);
     }
   }),
@@ -32,7 +32,7 @@ module.exports = {
       });
       request.on('end', function() {
         body = JSON.parse(body);
-        body.timeout = body.timeout || request.query.timeout || DEFAULT_TIMEOUT;
+        body.timeout = body.timeout || request.query.timeout || DEFAULT_TIMEOUT_SECONDS;
         body.type = body.type || 'droonga-' + messageType;
         connection.emit(messageType, body);
       });
-------------- next part --------------
HTML����������������������������...
Download 



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