Example #1
0
 def wait(self, sleep=1):
   """ Waits for all job-folders to execute and finish. """
   from time import sleep as ossleep
   from . import NotStarted
   if self.nbjobsleft == 0 and super(JobFolderProcess, self).wait():
     return True
   if not hasattr(self, '_comm'): raise NotStarted("Process was never started.")
   while self.poll() == False: ossleep(sleep)
   return False
Example #2
0
 def wait(self, sleep=1):
     """ Waits for all job-folders to execute and finish. """
     from time import sleep as ossleep
     from . import NotStarted
     if self.nbjobsleft == 0 and super(JobFolderProcess, self).wait():
         return True
     if not hasattr(self, '_comm'):
         raise NotStarted("Process was never started.")
     while self.poll() == False:
         ossleep(sleep)
     return False
Example #3
0
def sleep(sleepTime):
    print 'Sleeping for %s' % sleepTime
    ossleep(sleepTime)
Example #4
0
def sleep(sleepTime):
    print('Sleeping for %s' % sleepTime)
    ossleep(sleepTime)