Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
E
edx-platform
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-platform
Commits
3f9027d0
Commit
3f9027d0
authored
Aug 13, 2015
by
Calen Pennington
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Log delete_many calls and metrics
parent
448356ed
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
1 deletions
+9
-1
lms/djangoapps/courseware/user_state_client.py
+9
-1
No files found.
lms/djangoapps/courseware/user_state_client.py
View file @
3f9027d0
...
...
@@ -245,13 +245,21 @@ class DjangoXBlockUserStateClient(XBlockUserStateClient):
Arguments:
username: The name of the user whose state should be deleted
block_key
(UsageKey
): The UsageKey identifying which xblock state to delete.
block_key
s (list
): The UsageKey identifying which xblock state to delete.
scope (Scope): The scope to delete data from
fields: A list of fields to delete. If None, delete all stored fields.
"""
if
scope
!=
Scope
.
user_state
:
raise
ValueError
(
"Only Scope.user_state is supported"
)
evt_time
=
time
()
if
fields
is
None
:
self
.
_ddog_increment
(
evt_time
,
'delete_many.empty_state'
)
else
:
self
.
_ddog_histogram
(
evt_time
,
'delete_many.field_count'
,
len
(
fields
))
self
.
_ddog_histogram
(
evt_time
,
'delete_many.block_count'
,
len
(
block_keys
))
student_modules
=
self
.
_get_student_modules
(
username
,
block_keys
)
for
student_module
,
_
in
student_modules
:
if
fields
is
None
:
...
...
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