Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
E
edx-ora2
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
edx
edx-ora2
Commits
9ade8540
Commit
9ade8540
authored
Jun 11, 2014
by
Will Daly
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #428 from edx/will/even-more-logging-and-metrics
Add info-level logging to the workflow API
parents
8e62f837
d4d53bcb
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
0 deletions
+11
-0
openassessment/workflow/api.py
+8
-0
openassessment/workflow/models.py
+3
-0
No files found.
openassessment/workflow/api.py
View file @
9ade8540
...
...
@@ -64,6 +64,10 @@ def create_workflow(submission_uuid, steps):
try
:
workflow
=
AssessmentWorkflow
.
start_workflow
(
submission_uuid
,
steps
)
logger
.
info
((
u"Started assessment workflow for "
u"submission UUID {uuid} with steps {steps}"
)
.
format
(
uuid
=
submission_uuid
,
steps
=
steps
))
return
AssessmentWorkflowSerializer
(
workflow
)
.
data
except
sub_api
.
SubmissionNotFoundError
:
err_msg
=
sub_err_msg
(
"submission not found"
)
...
...
@@ -252,6 +256,10 @@ def update_from_assessments(submission_uuid, assessment_requirements):
try
:
workflow
.
update_from_assessments
(
assessment_requirements
)
logger
.
info
((
u"Updated workflow for submission UUID {uuid} "
u"with requirements {reqs}"
)
.
format
(
uuid
=
submission_uuid
,
reqs
=
assessment_requirements
))
return
_serialized_with_details
(
workflow
,
assessment_requirements
)
except
PeerAssessmentError
as
err
:
err_msg
=
u"Could not update assessment workflow: {}"
.
format
(
err
)
...
...
openassessment/workflow/models.py
View file @
9ade8540
...
...
@@ -281,6 +281,9 @@ class AssessmentWorkflow(TimeStampedModel, StatusModel):
if
self
.
status
!=
new_status
:
self
.
status
=
new_status
self
.
save
()
logger
.
info
((
u"Workflow for submission UUID {uuid} has updated status to {status}"
)
.
format
(
uuid
=
self
.
submission_uuid
,
status
=
new_status
))
def
_get_steps
(
self
):
"""
...
...
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