[Swift-commit] r7633 - branches/release-0.94/bin

davidk at ci.uchicago.edu davidk at ci.uchicago.edu
Wed Mar 5 15:53:10 CST 2014


Author: davidk
Date: 2014-03-05 15:53:09 -0600 (Wed, 05 Mar 2014)
New Revision: 7633

Modified:
   branches/release-0.94/bin/start-coaster-service
Log:
Start workers in parallel


Modified: branches/release-0.94/bin/start-coaster-service
===================================================================
--- branches/release-0.94/bin/start-coaster-service	2014-03-04 22:20:06 UTC (rev 7632)
+++ branches/release-0.94/bin/start-coaster-service	2014-03-05 21:53:09 UTC (rev 7633)
@@ -41,6 +41,8 @@
 # Start SSH workers
 start-workers-ssh()
 {
+   waitpids=""
+
    for MACHINE in $WORKER_HOSTS
    do
       # Enable ssh tunneling if needed
@@ -49,11 +51,15 @@
       fi
 
       # Connect directly
-      run_command ssh $WORKER_USERNAME@$MACHINE mkdir -p $WORKER_LOCATION
-      run_command scp $WORKER $WORKER_USERNAME@$MACHINE:$WORKER_LOCATION
       echo Starting worker on $MACHINE
-      run_command_bg ssh $WORKER_USERNAME@$MACHINE "WORKER_LOGGING_LEVEL=$WORKER_LOGGING_LEVEL $WORKER_LOCATION/worker.pl $WORKERURL $MACHINE $WORKER_LOG_DIR"
+      (
+        run_command ssh $WORKER_USERNAME@$MACHINE "mkdir -p $WORKER_LOCATION && mkdir -p $WORKER_LOG_DIR" ;
+        run_command scp $WORKER $WORKER_USERNAME@$MACHINE:$WORKER_LOCATION ;
+        run_command ssh $WORKER_USERNAME@$MACHINE "WORKER_LOGGING_LEVEL=$WORKER_LOGGING_LEVEL nohup $WORKER_LOCATION/worker.pl $WORKERURL $MACHINE $WORKER_LOG_DIR &> /dev/null &"
+      ) &
+      waitpids="$waitpids $!"
    done
+   wait $waitpids
    return 0
 }
 




More information about the Swift-commit mailing list