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
4a969f9f
Commit
4a969f9f
authored
Oct 27, 2014
by
Usman Khalid
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added autoretry_read decorator to methods which use mongo cursor.
PLAT-71
parent
328a79cc
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
0 deletions
+7
-0
common/lib/xmodule/xmodule/modulestore/mongo/base.py
+4
-0
common/lib/xmodule/xmodule/modulestore/split_mongo/split.py
+3
-0
No files found.
common/lib/xmodule/xmodule/modulestore/mongo/base.py
View file @
4a969f9f
...
...
@@ -526,6 +526,7 @@ class MongoModuleStore(ModuleStoreDraftAndPublished, ModuleStoreWriteBase, Mongo
connection
.
drop_database
(
self
.
collection
.
database
.
proxied_object
)
connection
.
close
()
@autoretry_read
()
def
fill_in_run
(
self
,
course_key
):
"""
In mongo some course_keys are used without runs. This helper function returns
...
...
@@ -699,6 +700,7 @@ class MongoModuleStore(ModuleStoreDraftAndPublished, ModuleStoreWriteBase, Mongo
item
[
'location'
]
=
item
[
'_id'
]
del
item
[
'_id'
]
@autoretry_read
()
def
_query_children_for_cache_children
(
self
,
course_key
,
items
):
"""
Generate a pymongo in query for finding the items and return the payloads
...
...
@@ -803,6 +805,7 @@ class MongoModuleStore(ModuleStoreDraftAndPublished, ModuleStoreWriteBase, Mongo
for
item
in
items
]
@autoretry_read
()
def
get_courses
(
self
,
**
kwargs
):
'''
Returns a list of course descriptors.
...
...
@@ -934,6 +937,7 @@ class MongoModuleStore(ModuleStoreDraftAndPublished, ModuleStoreWriteBase, Mongo
for
key
in
(
'tag'
,
'org'
,
'course'
,
'category'
,
'name'
,
'revision'
)
])
@autoretry_read
()
def
get_items
(
self
,
course_id
,
...
...
common/lib/xmodule/xmodule/modulestore/split_mongo/split.py
View file @
4a969f9f
...
...
@@ -72,6 +72,7 @@ from xmodule.modulestore.exceptions import InsufficientSpecificationError, Versi
from
xmodule.modulestore
import
(
inheritance
,
ModuleStoreWriteBase
,
ModuleStoreEnum
,
BulkOpsRecord
,
BulkOperationsMixin
)
from
xmodule.modulestore.mongodb_proxy
import
autoretry_read
from
..exceptions
import
ItemNotFoundError
from
.caching_descriptor_system
import
CachingDescriptorSystem
...
...
@@ -775,6 +776,7 @@ class SplitMongoModuleStore(SplitBulkWriteMixin, ModuleStoreWriteBase):
# add it in the envelope for the structure.
return
CourseEnvelope
(
course_key
.
replace
(
version_guid
=
version_guid
),
entry
)
@autoretry_read
()
def
get_courses
(
self
,
branch
,
**
kwargs
):
'''
Returns a list of course descriptors matching any given qualifiers.
...
...
@@ -2631,6 +2633,7 @@ class SplitMongoModuleStore(SplitBulkWriteMixin, ModuleStoreWriteBase):
"""
structure
[
'blocks'
][
block_key
]
=
content
@autoretry_read
()
def
find_courses_by_search_target
(
self
,
field_name
,
field_value
):
"""
Find all the courses which cached that they have the given field with the given value.
...
...
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