Esempio n. 1
0
 def wait(self):
     retcode = subprocess.Popen.wait(self)
     wall_clock_time = time.time() - self.wall_clock_start_time
     set_property('%s_wall_clock_time' % self.name, wall_clock_time)
     if wall_clock_time > self.wall_clock_time_limit:
         set_property('error', 'unexplained-warning-wall-clock-time-very-high')
         sys.stderr.write('Error: wall-clock time for %s too high: %.2f > %d\n' %
             (self.name, wall_clock_time, self.wall_clock_time_limit))
     return retcode
#! /usr/bin/env python
# -*- coding: utf-8 -*-

import sys
import os

# make sure we're in the run directory
os.chdir(os.path.dirname(os.path.abspath(__file__)))

from lab.calls.call import Call
from lab.calls.log import driver_log, driver_err

sys.stdout = driver_log
sys.stderr = driver_err

from lab.calls.log import print_, redirects, save_returncode
from lab.calls.log import set_property

set_property('queue', os.environ.get('QUEUE'))
"""VARIABLES"""
"""CALLS"""

for stream in redirects.values():
    stream.close()
Esempio n. 3
0
#! /usr/bin/env python
# -*- coding: utf-8 -*-

import sys
import os

# make sure we're in the run directory
os.chdir(os.path.dirname(os.path.abspath(__file__)))

from lab.calls.call import Call
from lab.calls.log import driver_log, driver_err

sys.stdout = driver_log
sys.stderr = driver_err

from lab.calls.log import print_, redirects, save_returncode
from lab.calls.log import set_property

set_property('queue', os.environ.get('QUEUE'))


"""VARIABLES"""

"""CALLS"""

for stream in redirects.values():
    stream.close()