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
298e7a23
Commit
298e7a23
authored
Dec 06, 2013
by
Don Mitchell
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Shorten collection name to keep index name w/in limit
parent
b5691cd4
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
10 additions
and
11 deletions
+10
-11
common/lib/xmodule/xmodule/modulestore/mongo/base.py
+0
-1
common/lib/xmodule/xmodule/modulestore/tests/django_utils.py
+3
-3
common/lib/xmodule/xmodule/modulestore/tests/test_location_mapper.py
+1
-1
common/lib/xmodule/xmodule/modulestore/tests/test_mixed_modulestore.py
+1
-1
common/lib/xmodule/xmodule/modulestore/tests/test_mongo.py
+1
-1
common/lib/xmodule/xmodule/modulestore/tests/test_orphan.py
+1
-1
common/lib/xmodule/xmodule/modulestore/tests/test_publish.py
+1
-1
common/lib/xmodule/xmodule/modulestore/tests/test_split_migrator.py
+1
-1
common/lib/xmodule/xmodule/modulestore/tests/test_split_modulestore.py
+1
-1
No files found.
common/lib/xmodule/xmodule/modulestore/mongo/base.py
View file @
298e7a23
...
@@ -297,7 +297,6 @@ class MongoModuleStore(ModuleStoreWriteBase):
...
@@ -297,7 +297,6 @@ class MongoModuleStore(ModuleStoreWriteBase):
# that is used when querying by a location
# that is used when querying by a location
self
.
collection
.
ensure_index
(
self
.
collection
.
ensure_index
(
zip
((
'_id.'
+
field
for
field
in
Location
.
_fields
),
repeat
(
1
)),
zip
((
'_id.'
+
field
for
field
in
Location
.
_fields
),
repeat
(
1
)),
name
=
"location_index"
)
)
if
default_class
is
not
None
:
if
default_class
is
not
None
:
...
...
common/lib/xmodule/xmodule/modulestore/tests/django_utils.py
View file @
298e7a23
...
@@ -55,7 +55,7 @@ def mongo_store_config(data_dir):
...
@@ -55,7 +55,7 @@ def mongo_store_config(data_dir):
'DOC_STORE_CONFIG'
:
{
'DOC_STORE_CONFIG'
:
{
'host'
:
'localhost'
,
'host'
:
'localhost'
,
'db'
:
'test_xmodule'
,
'db'
:
'test_xmodule'
,
'collection'
:
'modulestore
_
%
s'
%
uuid4
()
.
hex
,
'collection'
:
'modulestore
{0}'
.
format
(
uuid4
()
.
hex
[:
5
])
,
},
},
'OPTIONS'
:
{
'OPTIONS'
:
{
'default_class'
:
'xmodule.raw_module.RawDescriptor'
,
'default_class'
:
'xmodule.raw_module.RawDescriptor'
,
...
@@ -86,7 +86,7 @@ def draft_mongo_store_config(data_dir):
...
@@ -86,7 +86,7 @@ def draft_mongo_store_config(data_dir):
'DOC_STORE_CONFIG'
:
{
'DOC_STORE_CONFIG'
:
{
'host'
:
'localhost'
,
'host'
:
'localhost'
,
'db'
:
'test_xmodule'
,
'db'
:
'test_xmodule'
,
'collection'
:
'modulestore
_
%
s'
%
uuid4
()
.
hex
,
'collection'
:
'modulestore
{0}'
.
format
(
uuid4
()
.
hex
[:
5
])
,
},
},
'OPTIONS'
:
modulestore_options
'OPTIONS'
:
modulestore_options
}
}
...
@@ -121,7 +121,7 @@ def studio_store_config(data_dir):
...
@@ -121,7 +121,7 @@ def studio_store_config(data_dir):
store_config
=
{
store_config
=
{
'host'
:
'localhost'
,
'host'
:
'localhost'
,
'db'
:
'test_xmodule'
,
'db'
:
'test_xmodule'
,
'collection'
:
'modulestore
_
%
s'
%
uuid4
()
.
hex
,
'collection'
:
'modulestore
{0}'
.
format
(
uuid4
()
.
hex
[:
5
])
,
}
}
options
=
{
options
=
{
'default_class'
:
'xmodule.raw_module.RawDescriptor'
,
'default_class'
:
'xmodule.raw_module.RawDescriptor'
,
...
...
common/lib/xmodule/xmodule/modulestore/tests/test_location_mapper.py
View file @
298e7a23
...
@@ -20,7 +20,7 @@ class TestLocationMapper(unittest.TestCase):
...
@@ -20,7 +20,7 @@ class TestLocationMapper(unittest.TestCase):
modulestore_options
=
{
modulestore_options
=
{
'host'
:
'localhost'
,
'host'
:
'localhost'
,
'db'
:
'test_xmodule'
,
'db'
:
'test_xmodule'
,
'collection'
:
'modulestore{0}'
.
format
(
uuid
.
uuid4
()
.
hex
),
'collection'
:
'modulestore{0}'
.
format
(
uuid
.
uuid4
()
.
hex
[:
5
]
),
}
}
# pylint: disable=W0142
# pylint: disable=W0142
...
...
common/lib/xmodule/xmodule/modulestore/tests/test_mixed_modulestore.py
View file @
298e7a23
...
@@ -21,7 +21,7 @@ from xmodule.modulestore.mixed import MixedModuleStore
...
@@ -21,7 +21,7 @@ from xmodule.modulestore.mixed import MixedModuleStore
HOST
=
'localhost'
HOST
=
'localhost'
PORT
=
27017
PORT
=
27017
DB
=
'test_mongo_
%
s'
%
uuid4
()
.
hex
DB
=
'test_mongo_
%
s'
%
uuid4
()
.
hex
[:
5
]
COLLECTION
=
'modulestore'
COLLECTION
=
'modulestore'
FS_ROOT
=
DATA_DIR
FS_ROOT
=
DATA_DIR
DEFAULT_CLASS
=
'xmodule.raw_module.RawDescriptor'
DEFAULT_CLASS
=
'xmodule.raw_module.RawDescriptor'
...
...
common/lib/xmodule/xmodule/modulestore/tests/test_mongo.py
View file @
298e7a23
...
@@ -28,7 +28,7 @@ log = logging.getLogger(__name__)
...
@@ -28,7 +28,7 @@ log = logging.getLogger(__name__)
HOST
=
'localhost'
HOST
=
'localhost'
PORT
=
27017
PORT
=
27017
DB
=
'test_mongo_
%
s'
%
uuid4
()
.
hex
DB
=
'test_mongo_
%
s'
%
uuid4
()
.
hex
[:
5
]
COLLECTION
=
'modulestore'
COLLECTION
=
'modulestore'
FS_ROOT
=
DATA_DIR
# TODO (vshnayder): will need a real fs_root for testing load_item
FS_ROOT
=
DATA_DIR
# TODO (vshnayder): will need a real fs_root for testing load_item
DEFAULT_CLASS
=
'xmodule.raw_module.RawDescriptor'
DEFAULT_CLASS
=
'xmodule.raw_module.RawDescriptor'
...
...
common/lib/xmodule/xmodule/modulestore/tests/test_orphan.py
View file @
298e7a23
...
@@ -33,7 +33,7 @@ class TestOrphan(unittest.TestCase):
...
@@ -33,7 +33,7 @@ class TestOrphan(unittest.TestCase):
split_course_id
=
'test_org.test_course.runid'
split_course_id
=
'test_org.test_course.runid'
def
setUp
(
self
):
def
setUp
(
self
):
self
.
db_config
[
'collection'
]
=
'modulestore{0}'
.
format
(
uuid
.
uuid4
()
.
hex
)
self
.
db_config
[
'collection'
]
=
'modulestore{0}'
.
format
(
uuid
.
uuid4
()
.
hex
[:
5
]
)
self
.
userid
=
random
.
getrandbits
(
32
)
self
.
userid
=
random
.
getrandbits
(
32
)
super
(
TestOrphan
,
self
)
.
setUp
()
super
(
TestOrphan
,
self
)
.
setUp
()
...
...
common/lib/xmodule/xmodule/modulestore/tests/test_publish.py
View file @
298e7a23
...
@@ -34,7 +34,7 @@ class TestPublish(unittest.TestCase):
...
@@ -34,7 +34,7 @@ class TestPublish(unittest.TestCase):
}
}
def
setUp
(
self
):
def
setUp
(
self
):
self
.
db_config
[
'collection'
]
=
'modulestore{0}'
.
format
(
uuid
.
uuid4
()
.
hex
)
self
.
db_config
[
'collection'
]
=
'modulestore{0}'
.
format
(
uuid
.
uuid4
()
.
hex
[:
5
]
)
self
.
old_mongo
=
MongoModuleStore
(
self
.
db_config
,
**
self
.
modulestore_options
)
self
.
old_mongo
=
MongoModuleStore
(
self
.
db_config
,
**
self
.
modulestore_options
)
self
.
draft_mongo
=
DraftMongoModuleStore
(
self
.
db_config
,
**
self
.
modulestore_options
)
self
.
draft_mongo
=
DraftMongoModuleStore
(
self
.
db_config
,
**
self
.
modulestore_options
)
...
...
common/lib/xmodule/xmodule/modulestore/tests/test_split_migrator.py
View file @
298e7a23
...
@@ -31,7 +31,7 @@ class TestMigration(unittest.TestCase):
...
@@ -31,7 +31,7 @@ class TestMigration(unittest.TestCase):
db_config
=
{
db_config
=
{
'host'
:
'localhost'
,
'host'
:
'localhost'
,
'db'
:
'test_xmodule'
,
'db'
:
'test_xmodule'
,
'collection'
:
'modulestore{0}'
.
format
(
uuid
.
uuid4
()
.
hex
),
'collection'
:
'modulestore{0}'
.
format
(
uuid
.
uuid4
()
.
hex
[:
5
]
),
}
}
modulestore_options
=
{
modulestore_options
=
{
...
...
common/lib/xmodule/xmodule/modulestore/tests/test_split_modulestore.py
View file @
298e7a23
...
@@ -32,7 +32,7 @@ class SplitModuleTest(unittest.TestCase):
...
@@ -32,7 +32,7 @@ class SplitModuleTest(unittest.TestCase):
DOC_STORE_CONFIG
=
{
DOC_STORE_CONFIG
=
{
'host'
:
'localhost'
,
'host'
:
'localhost'
,
'db'
:
'test_xmodule'
,
'db'
:
'test_xmodule'
,
'collection'
:
'modulestore{0}'
.
format
(
uuid
.
uuid4
()
.
hex
),
'collection'
:
'modulestore{0}'
.
format
(
uuid
.
uuid4
()
.
hex
[:
5
]
),
}
}
modulestore_options
=
{
modulestore_options
=
{
'default_class'
:
'xmodule.raw_module.RawDescriptor'
,
'default_class'
:
'xmodule.raw_module.RawDescriptor'
,
...
...
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