solexa2srf likes to produce output, so my trick of watching the
authorDiane Trout <diane@caltech.edu>
Thu, 25 Sep 2008 00:04:19 +0000 (00:04 +0000)
committerDiane Trout <diane@caltech.edu>
Thu, 25 Sep 2008 00:04:19 +0000 (00:04 +0000)
sockets to block until when the process ends didn't work.

This patch inserts a simple sleep(1) (second) into the code that
waits for the jobs to finish to prevent the queue manager from rapidly
spinning.

It should probably be fixed with a better way of monitoring for when
a process finishes

gaworkflow/util/queuecommands.py

index da10193d6b26564c78201e4339118ff27129d67e..78728ae552f43a6172e6b6280c6f72d2442b32e1 100644 (file)
@@ -7,6 +7,7 @@ from subprocess import PIPE
 import subprocess
 import select
 import sys
+import time
 
 class QueueCommands(object):
     """
@@ -83,4 +84,4 @@ class QueueCommands(object):
                     queue_log.info("Process %d finished [%d]",
                                    pending.pid, pending.returncode)
                     del self.running[pending_fd]
-
+            time.sleep(1)