[Groonga-commit] groonga/groonga [master] deb: add --max-time for status command

Back to archive index

null+****@clear***** null+****@clear*****
2012年 8月 2日 (木) 13:18:22 JST


HAYASHI Kentaro	2012-08-02 13:18:22 +0900 (Thu, 02 Aug 2012)

  New Revision: c2024bf67e7d8c34fa0d4549b7b416b0ab20084d
  https://github.com/groonga/groonga/commit/c2024bf67e7d8c34fa0d4549b7b416b0ab20084d

  Log:
    deb: add --max-time for status command

  Modified files:
    packages/debian/groonga-httpd.default
    packages/debian/groonga-httpd.init

  Modified: packages/debian/groonga-httpd.default (+1 -1)
===================================================================
--- packages/debian/groonga-httpd.default    2012-08-02 13:06:34 +0900 (0f01c4c)
+++ packages/debian/groonga-httpd.default    2012-08-02 13:18:22 +0900 (01141d4)
@@ -7,6 +7,6 @@
 #LOG_PATH=/var/log/groonga/groonga.log
 #QUERY_LOG_PATH=/var/log/groonga/query.log
 #PROTOCOL=http
-
+STATUS_TIMEOUT=3
 # Comment out this to disable groonga-httpd daemon.
 ENABLE=yes

  Modified: packages/debian/groonga-httpd.init (+5 -1)
===================================================================
--- packages/debian/groonga-httpd.init    2012-08-02 13:06:34 +0900 (dcfdc83)
+++ packages/debian/groonga-httpd.init    2012-08-02 13:18:22 +0900 (8ddfe09)
@@ -64,7 +64,11 @@ DAEMON_ARGS="${DAEMON_ARGS} ${OPTION_ARGS}"
 send_command()
 {
     command=$1
-    $CURL "http://${ADDRESS}:${PORT}/d/${command}"
+    if [ "$command" = "status" ]; then
+	$CURL --max-time $STATUS_TIMEOUT "http://${ADDRESS}:${PORT}/d/${command}"
+    else 
+	$CURL "http://${ADDRESS}:${PORT}/d/${command}"
+    fi
 }
 
 #
-------------- next part --------------
HTML$B$NE:IU%U%!%$%k$rJ]4I$7$^$7$?(B...
Download 



Groonga-commit メーリングリストの案内
Back to archive index