Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
vidjil
vidjil
Commits
f4aa5518
Commit
f4aa5518
authored
Feb 25, 2016
by
HERBERT Ryan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
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
Showing
1 changed file
with
11 additions
and
1 deletion
+11
-1
server/web2py/applications/vidjil/models/task.py
server/web2py/applications/vidjil/models/task.py
+11
-1
No files found.
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
...
@@ -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
...
...
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