예제 #1
0
def kill_threads():
    print "\n"
    msg.info('kill threads')
    for t in threading.enumerate():
        if isinstance(t, TasksStarter):
            msg.info("kill task on '%s'" % t._host)
            t._write_broken()
            t.kill()
        t._Thread__stop()
예제 #2
0
파일: grid.py 프로젝트: Solvi/pyhrf
def kill_threads():
    print "\n"
    msg.info('kill threads')
    for t in threading.enumerate():
        if isinstance(t, TasksStarter):
            msg.info("kill task on '%s'" % t._host)
            t._write_broken()
            t.kill()
        t._Thread__stop()
예제 #3
0
파일: grid.py 프로젝트: Solvi/pyhrf
 def wait_to_be_ready(self):
     we_have_waited = False
     if not self._timeslot.is_inside_now():
         we_have_waited = True
         now = time.asctime(time.localtime())
         msg.info('all tasks stopped : %s' % now)
     while not self._timeslot.is_inside_now():
         time.sleep(60)
     if we_have_waited:
         now = time.asctime(time.localtime())
         msg.info('start all remaining tasks : %s' % now)
예제 #4
0
 def wait_to_be_ready(self):
     we_have_waited = False
     if not self._timeslot.is_inside_now():
         we_have_waited = True
         now = time.asctime(time.localtime())
         msg.info('all tasks stopped : %s' % now)
     while not self._timeslot.is_inside_now():
         time.sleep(60)
     if we_have_waited:
         now = time.asctime(time.localtime())
         msg.info('start all remaining tasks : %s' % now)