Commit 0846010c authored by Jerome Mariette's avatar Jerome Mariette
Browse files

fix a bug with storage_size

parent 9a69e3bc
......@@ -209,11 +209,11 @@ class Analysis (Component):
try: os.rmdir(self.__get_work_directory())
except: pass
logging.getLogger("Analysis.sync").debug("Synchronization done for analysis id=" + str(self.id) + "(retcode=" + str(retcode) + ")")
# update the storage size
t3mysql = t3MySQLdb()
t3mysql.update_analysis_field(self.id, "storage_size", Utils.get_storage_size(self.__get_save_directory()))
else:
logging.getLogger("Analysis.sync").info("The synchronisation has not been performed, either because " + self.__get_work_directory() + " does not exists or because the source and destination folders are the same.")
# update the storage size
t3mysql = t3MySQLdb()
t3mysql.update_analysis_field(self.id, "storage_size", Utils.get_storage_size(self.__get_save_directory()))
except Exception, err:
raise Exception(str(err))
......
......@@ -246,9 +246,9 @@ class Run(object):
try: os.rmdir(self.__get_work_directory())
except: pass
logging.getLogger("Run.sync").debug("Synchronization done for run id=" + str(self.id) + "(retcode=" + str(retcode) + ")")
# update the storage size
t3mysql = t3MySQLdb()
t3mysql.update_run_info(self.id, storage_size=Utils.get_storage_size(self.__get_save_directory()))
# update the storage size
t3mysql = t3MySQLdb()
t3mysql.update_run_info(self.id, storage_size=Utils.get_storage_size(self.__get_save_directory()))
except Exception, err:
raise Exception(str(err))
......
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