Commit f4aa5518 authored by HERBERT Ryan's avatar HERBERT Ryan
Browse files

models/task.py result datafile

Put the results_file data_file stream back in because it is needed
parent 2958f7c0
...@@ -253,13 +253,23 @@ def run_mixcr(id_file, id_config, id_data, id_fuse, clean_before=False, clean_af ...@@ -253,13 +253,23 @@ def run_mixcr(id_file, id_config, id_data, id_fuse, clean_before=False, clean_af
alignments_filepath = os.path.abspath(out_alignments) alignments_filepath = os.path.abspath(out_alignments)
results_filepath = os.path.abspath(out_results)
try:
stream = open(results_filepath, 'rb')
except IOError:
print "!!! MiXCR failed, no result file"
res = {"message": "[%s] c%s: MiXCR FAILED - %s" % (id_data, id_config, out_folder)}
log.error(res)
raise IOError
## insertion dans la base de donnée ## insertion dans la base de donnée
ts = time.time() ts = time.time()
db.results_file[id_data] = dict(status = "ready", db.results_file[id_data] = dict(status = "ready",
run_date = datetime.datetime.fromtimestamp(ts).strftime('%Y-%m-%d %H:%M:%S'), run_date = datetime.datetime.fromtimestamp(ts).strftime('%Y-%m-%d %H:%M:%S'),
data_file = out_results data_file = stream
) )
db.commit() db.commit()
config_name = db.config[id_config].name config_name = db.config[id_config].name
......
Markdown is supported
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