Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
On Thursday, 7th July from 1 to 3 pm there will be a maintenance with a short downtime of GitLab.
Open sidebar
nomad-lab
nomad-FAIR
Commits
3215597d
Commit
3215597d
authored
Mar 04, 2019
by
Markus Scheidgen
Browse files
Minor changes to processing log entries.
parent
b6da26ee
Changes
1
Hide whitespace changes
Inline
Side-by-side
nomad/processing/data.py
View file @
3215597d
...
...
@@ -254,17 +254,17 @@ class Calc(Proc):
calc_with_metadata
=
self
.
_parser_backend
.
to_calc_with_metadata
()
# persist the repository metadata
with
utils
.
timer
(
logger
,
'saved repo metadata'
,
step
=
'
persist
'
):
with
utils
.
timer
(
logger
,
'saved repo metadata'
,
step
=
'
metadata
'
):
self
.
upload_files
.
metadata
.
insert
(
calc_with_metadata
.
to_dict
())
# index in search
with
utils
.
timer
(
logger
,
'indexed'
,
step
=
'
persist
'
):
with
utils
.
timer
(
logger
,
'indexed'
,
step
=
'
index
'
):
calc_with_metadata
.
update
(
published
=
False
,
uploader
=
self
.
upload
.
uploader
.
to_popo
())
search
.
Entry
.
from_calc_with_metadata
(
calc_with_metadata
).
save
()
# persist the archive
with
utils
.
timer
(
logger
,
'archived'
,
step
=
'
persist
'
,
logger
,
'archived'
,
step
=
'
archive
'
,
input_size
=
self
.
mainfile_file
.
size
)
as
log_data
:
with
self
.
upload_files
.
archive_file
(
self
.
calc_id
,
'wt'
)
as
out
:
self
.
_parser_backend
.
write_json
(
out
,
pretty
=
True
)
...
...
@@ -274,7 +274,7 @@ class Calc(Proc):
# close loghandler
if
self
.
_calc_proc_logwriter
is
not
None
:
with
utils
.
timer
(
logger
,
'archived log'
,
step
=
'
persist
'
,
logger
,
'archived log'
,
step
=
'
logs
'
,
input_size
=
self
.
mainfile_file
.
size
)
as
log_data
:
self
.
_calc_proc_logwriter_ctx
.
__exit__
(
None
,
None
,
None
)
# pylint: disable=E1101
self
.
_calc_proc_logwriter
=
None
...
...
@@ -371,12 +371,12 @@ class Upload(Proc):
with
utils
.
lnr
(
logger
,
'staged upload delete failed'
):
with
utils
.
timer
(
logger
,
'upload deleted from index'
,
step
=
'
delete
'
,
logger
,
'upload deleted from index'
,
step
=
'
index
'
,
upload_size
=
self
.
upload_files
.
size
):
search
.
delete_upload
(
self
.
upload_id
)
with
utils
.
timer
(
logger
,
'staged upload deleted'
,
step
=
'
delete
'
,
logger
,
'staged upload deleted'
,
step
=
'
files
'
,
upload_size
=
self
.
upload_files
.
size
):
self
.
upload_files
.
delete
()
self
.
delete
()
...
...
@@ -398,13 +398,13 @@ class Upload(Proc):
upload_with_metadata
=
self
.
to_upload_with_metadata
()
with
utils
.
timer
(
logger
,
'upload added to repository'
,
step
=
'
publish
'
,
logger
,
'upload added to repository'
,
step
=
'
repo
'
,
upload_size
=
self
.
upload_files
.
size
):
upload_transaction_complete
=
coe_repo
.
Upload
.
publish
(
upload_with_metadata
)
try
:
with
utils
.
timer
(
logger
,
'staged upload files packed'
,
step
=
'p
ublish
'
,
logger
,
'staged upload files packed'
,
step
=
'p
ack
'
,
upload_size
=
self
.
upload_files
.
size
):
coe_upload
=
coe_repo
.
Upload
.
from_upload_id
(
upload_with_metadata
.
upload_id
)
if
coe_upload
is
not
None
:
...
...
@@ -418,7 +418,7 @@ class Upload(Proc):
self
.
upload_files
.
pack
()
with
utils
.
timer
(
logger
,
'index updated'
,
step
=
'
publish
'
,
logger
,
'index updated'
,
step
=
'
index
'
,
upload_size
=
self
.
upload_files
.
size
):
coe_upload
=
coe_repo
.
Upload
.
from_upload_id
(
upload_with_metadata
.
upload_id
)
if
coe_upload
is
not
None
:
...
...
@@ -426,7 +426,7 @@ class Upload(Proc):
[
coe_calc
.
to_calc_with_metadata
()
for
coe_calc
in
coe_upload
.
calcs
])
with
utils
.
timer
(
logger
,
'staged upload deleted'
,
step
=
'
publish
'
,
logger
,
'staged upload deleted'
,
step
=
'
delete staged
'
,
upload_size
=
self
.
upload_files
.
size
):
self
.
upload_files
.
delete
()
self
.
delete
()
...
...
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