Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Kontr 2.0
Portal API Backend
Commits
7d670ebe
Verified
Commit
7d670ebe
authored
Oct 08, 2018
by
Peter Stanko
Browse files
Fixed processing
parent
b7feea8d
Changes
1
Hide whitespace changes
Inline
Side-by-side
portal/async_celery/submission_processor.py
View file @
7d670ebe
...
...
@@ -141,7 +141,7 @@ class SubmissionProcessor:
def
process_result
(
self
):
storage_entity
=
self
.
storage
.
results
.
get
(
self
.
submission
.
id
)
# @mdujava - here put submission processing
self
.
_submission_result_processing
(
storage_entity
)
return
self
.
_submission_result_processing
(
storage_entity
)
def
_submission_result_processing
(
self
,
storage_entity
:
entities
.
Entity
):
suite_stats
=
storage_entity
.
get
(
'suite-stats.json'
)
...
...
@@ -152,8 +152,10 @@ class SubmissionProcessor:
return
self
.
_parse_stats
(
stats
)
def
_parse_stats
(
self
,
stats
:
dict
):
log
.
debug
(
f
"[PROC] Processing the stats:
{
stats
}
"
)
points
=
stats
.
get
(
'final_points'
,
0
)
result
=
stats
.
get
(
'result'
,
'none'
).
lower
()
log
.
debug
(
f
"[PROC] Processing stats: points=
{
points
}
, result=
{
result
}
"
)
self
.
submission
.
result
=
result
self
.
submission
.
points
=
points
return
self
.
submission
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