Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
nomad-lab
nomad-FAIR
Commits
416129a1
Commit
416129a1
authored
Feb 25, 2019
by
Markus Scheidgen
Browse files
Enhanced error handling and logging.
parent
114deb37
Changes
1
Hide whitespace changes
Inline
Side-by-side
nomad/processing/data.py
View file @
416129a1
...
...
@@ -164,6 +164,7 @@ class Calc(Proc):
self
.
fail
(
'parser failed with exception'
,
level
=
logging
.
ERROR
,
exc_info
=
e
,
error
=
str
(
e
),
**
context
)
return
self
.
_parser_backend
.
openNonOverlappingSection
(
'section_calculation_info'
)
self
.
_parser_backend
.
addValue
(
'upload_id'
,
self
.
upload_id
)
...
...
@@ -335,7 +336,7 @@ class Upload(Proc):
def
get_logger
(
self
,
**
kwargs
):
logger
=
super
().
get_logger
()
logger
=
logger
.
bind
(
upload_id
=
self
.
upload_id
,
**
kwargs
)
logger
=
logger
.
bind
(
upload_id
=
self
.
upload_id
,
upload_name
=
self
.
name
,
**
kwargs
)
return
logger
@
classmethod
...
...
@@ -479,12 +480,10 @@ class Upload(Proc):
parser
=
match_parser
(
filename
,
self
.
upload_files
)
if
parser
is
not
None
:
directory
=
os
.
path
.
dirname
(
filename
)
# TODO this might give us the chance to store directory based relationship
# between calcs for the future?
if
directory
in
directories_with_match
:
self
.
info
.
append
(
'The directory %s contains data from multiple code runs. '
'Nomad only processed %s.'
%
(
directory
,
os
.
path
.
basename
(
filename
)))
# TODO this might give us the chance to store directory based relationship
# between calcs for the future?
pass
else
:
directories_with_match
[
directory
]
=
filename
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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