You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@storm.apache.org by bo...@apache.org on 2015/03/11 21:10:15 UTC

[4/6] storm git commit: STORM-657:use when-not in supervisor.shutdown-worker

STORM-657:use when-not in supervisor.shutdown-worker


Project: http://git-wip-us.apache.org/repos/asf/storm/repo
Commit: http://git-wip-us.apache.org/repos/asf/storm/commit/1d9b2837
Tree: http://git-wip-us.apache.org/repos/asf/storm/tree/1d9b2837
Diff: http://git-wip-us.apache.org/repos/asf/storm/diff/1d9b2837

Branch: refs/heads/master
Commit: 1d9b28373faeb4a4d7b9017d8ffd130f3397b052
Parents: b1c993b
Author: caofangkun <ca...@gmail.com>
Authored: Thu Feb 12 09:25:05 2015 +0800
Committer: caofangkun <ca...@gmail.com>
Committed: Thu Feb 12 09:25:05 2015 +0800

----------------------------------------------------------------------
 storm-core/src/clj/backtype/storm/daemon/supervisor.clj | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/storm/blob/1d9b2837/storm-core/src/clj/backtype/storm/daemon/supervisor.clj
----------------------------------------------------------------------
diff --git a/storm-core/src/clj/backtype/storm/daemon/supervisor.clj b/storm-core/src/clj/backtype/storm/daemon/supervisor.clj
index 7764310..36f7a8a 100644
--- a/storm-core/src/clj/backtype/storm/daemon/supervisor.clj
+++ b/storm-core/src/clj/backtype/storm/daemon/supervisor.clj
@@ -258,9 +258,9 @@
       (if as-user
         (worker-launcher-and-wait conf user ["signal" pid "9"] :log-prefix (str "kill -15 " pid))
         (kill-process-with-sig-term pid)))
-    (if-not (empty? pids) (do 
-                            (log-message "Sleep " shutdown-sleep-secs " seconds for execution of cleanup threads on worker.")
-                            (sleep-secs shutdown-sleep-secs)))
+    (when-not (empty? pids)  
+      (log-message "Sleep " shutdown-sleep-secs " seconds for execution of cleanup threads on worker.")
+      (sleep-secs shutdown-sleep-secs))
     (doseq [pid pids]
       (if as-user
         (worker-launcher-and-wait conf user ["signal" pid "9"] :log-prefix (str "kill -9 " pid))