Commit bda2e506 authored by Jerome Mariette's avatar Jerome Mariette
Browse files

No commit message

No commit message
parent 35dd1ae3
......@@ -177,13 +177,13 @@ class Workflow(threading.Thread):
except SystemExit, e: print e
self.component_nameids_is_init = True
self._serialize()
self.process()
try: self.process()
except SystemExit, e: print e
if len(self.components) > 0:
self._execute_weaver()
self._serialize()
try: self.process()
except SystemExit, e: print e
if self.status == self.STATUS_STARTED: self.status = self.STATUS_COMPLETED
self.post_process()
if self.status == self.STATUS_STARTED: self.status = self.STATUS_COMPLETED
self.end_time = time.time()
self._serialize()
......
......@@ -103,6 +103,8 @@ class Analysis (Component):
# Set the temp folder to the ng6 temp folder
ng6conf = NG6ConfigReader()
tempfile.tempdir = ng6conf.get_tmp_directory()
if not os.path.isdir(tempfile.tempdir):
os.makedirs(tempfile.tempdir, 0751)
if id != None : # If not a new analysis
t3mysql = t3MySQLdb()
......@@ -188,6 +190,8 @@ class Analysis (Component):
"""
logging.getLogger("Analysis.sync").debug("Synchronizing analysis id=" + str(self.id) + " from " + self.__get_work_directory() + " to " + self.__get_save_directory())
try :
# First make the save directory
os.makedirs(self.__get_save_directory(), 0751)
if os.path.exists(self.__get_work_directory()) and self.__get_work_directory() != self.__get_save_directory():
cmd = "rsync -avh --remove-sent-files "+ self.__get_work_directory() + "/ " + self.__get_save_directory()
logging.getLogger("Analysis.sync").debug(cmd)
......
......@@ -98,8 +98,7 @@ class NG6Workflow (Workflow):
def post_process(self):
# once everything done, sync directories
if self.project:
self.project.sync()
elif self.runobj:
if self.runobj:
self.runobj.sync()
\ No newline at end of file
elif self.project:
self.project.sync()
......@@ -67,7 +67,9 @@ class Run(object):
# Set the temp folder to the ng6 temp folder
ng6conf = NG6ConfigReader()
tempfile.tempdir = ng6conf.get_tmp_directory()
if not os.path.isdir(tempfile.tempdir):
os.makedirs(tempfile.tempdir, 0751)
if id != None : # If not a new run
self.id = id
t3mysql = t3MySQLdb()
......@@ -230,6 +232,8 @@ class Run(object):
raise Exception(str(err))
# Finally the Run itself
try :
# First make the save directory
os.makedirs(self.__get_save_directory(), 0751)
if os.path.exists(self.__get_work_directory()) and self.__get_work_directory() != self.__get_save_directory():
cmd = "rsync -avh --remove-sent-files "+ self.__get_work_directory() + "/ " + self.__get_save_directory()
logging.getLogger("Run.sync").debug(cmd)
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment