Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
vidjil
vidjil
Commits
f4aa5518
Commit
f4aa5518
authored
Feb 25, 2016
by
HERBERT Ryan
Browse files
models/task.py result datafile
Put the results_file data_file stream back in because it is needed
parent
2958f7c0
Changes
1
Hide whitespace changes
Inline
Side-by-side
server/web2py/applications/vidjil/models/task.py
View file @
f4aa5518
...
...
@@ -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
)
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
ts
=
time
.
time
()
db
.
results_file
[
id_data
]
=
dict
(
status
=
"ready"
,
run_date
=
datetime
.
datetime
.
fromtimestamp
(
ts
).
strftime
(
'%Y-%m-%d %H:%M:%S'
),
data_file
=
out_results
data_file
=
stream
)
db
.
commit
()
config_name
=
db
.
config
[
id_config
].
name
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment