Salome HOME
Add a default value for the jobs timeout
[tools/sat.git] / commands / jobs.py
index 892e6512ced46895018a8db3660e77f18f378195..81a08db1248d5a5484a32a3d1602113d757918bb 100644 (file)
@@ -640,7 +640,10 @@ class Jobs(object):
         '''
         name = job_def.name
         cmmnds = job_def.commands
-        timeout = job_def.timeout
+        if not "timeout" in job_def:
+            timeout = 4*60*60 # default timeout = 4h
+        else:
+            timeout = job_def.timeout
         after = None
         if 'after' in job_def:
             after = job_def.after
@@ -1214,12 +1217,12 @@ class Gui(object):
                                                         job.machine.sat_path)
 
     def parse_csv_boards(self, today):
-        """ Parse the csv files that describes the boards to produce and fill 
+        """ Parse the csv file that describes the boards to produce and fill 
             the dict d_input_boards that contain the csv file contain
         
         :param today int: the current day of the week 
         """
-        # loop over each csv file and read its content
+        # open the csv file and read its content
         l_read = []
         with open(self.file_boards, 'r') as f:
             reader = csv.reader(f,delimiter=CSV_DELIMITER)
@@ -1475,7 +1478,7 @@ def run(args, runner, logger):
     gui = None
     if options.publish:
         # Copy the stylesheets in the log directory 
-        log_dir = runner.cfg.SITE.log.log_dir
+        log_dir = runner.cfg.USER.log_dir
         xsl_dir = os.path.join(runner.cfg.VARS.srcDir, 'xsl')
         files_to_copy = []
         files_to_copy.append(os.path.join(xsl_dir, STYLESHEET_GLOBAL))
@@ -1486,7 +1489,7 @@ def run(args, runner, logger):
         
         # Instanciate the Gui in order to produce the xml files that contain all
         # the boards
-        gui = Gui(runner.cfg.SITE.log.log_dir,
+        gui = Gui(runner.cfg.USER.log_dir,
                   today_jobs.ljobs,
                   today_jobs.ljobs_not_today,
                   file_boards = options.input_boards)