Commit e19e20ad by Feanil Patel

Separate the read preference per docstore.

This way you can change read preference for one of the module stores
without effecting the other.

Also fix whitespace.
parent fed04e57
......@@ -566,25 +566,31 @@ edxapp_environment:
# yaml based configs is complete
CONFIG_ROOT: "{{ edxapp_app_dir }}"
EDXAPP_LMS_MONGO_READ_PREFERENCE: 'PRIMARY'
EDXAPP_LMS_DRAFT_MONGO_READ_PREFERENCE: 'PRIMARY'
EDXAPP_LMS_SPLIT_MONGO_READ_PREFERENCE: 'PRIMARY'
EDXAPP_CMS_MONGO_READ_PREFERENCE: 'PRIMARY'
edxapp_generic_doc_store_config: &edxapp_generic_default_docstore
db: "{{ EDXAPP_MONGO_DB_NAME }}"
host: "{{ EDXAPP_MONGO_HOSTS }}"
password: "{{ EDXAPP_MONGO_PASSWORD }}"
port: "{{ EDXAPP_MONGO_PORT }}"
user: "{{ EDXAPP_MONGO_USER }}"
collection: 'modulestore'
ssl: "{{ EDXAPP_MONGO_USE_SSL }}"
edxapp_lms_doc_store_config:
<<: *edxapp_generic_default_docstore
read_preference: "{{ EDXAPP_LMS_MONGO_READ_PREFERENCE }}"
db: "{{ EDXAPP_MONGO_DB_NAME }}"
host: "{{ EDXAPP_MONGO_HOSTS }}"
password: "{{ EDXAPP_MONGO_PASSWORD }}"
port: "{{ EDXAPP_MONGO_PORT }}"
user: "{{ EDXAPP_MONGO_USER }}"
collection: 'modulestore'
ssl: "{{ EDXAPP_MONGO_USE_SSL }}"
edxapp_lms_draft_doc_store_config:
<<: *edxapp_generic_default_docstore
read_preference: "{{ EDXAPP_LMS_DRAFT_MONGO_READ_PREFERENCE }}"
edxapp_lms_split_doc_store_config:
<<: *edxapp_generic_default_docstore
read_preference: "{{ EDXAPP_LMS_SPLIT_MONGO_READ_PREFERENCE }}"
edxapp_cms_doc_store_config:
<<: *edxapp_generic_default_docstore
read_preference: "{{ EDXAPP_CMS_MONGO_READ_PREFERENCE }}"
<<: *edxapp_generic_default_docstore
read_preference: "{{ EDXAPP_CMS_MONGO_READ_PREFERENCE }}"
edxapp_generic_auth_config: &edxapp_generic_auth
EVENT_TRACKING_SEGMENTIO_EMIT_WHITELIST: "{{ EDXAPP_EVENT_TRACKING_SEGMENTIO_EMIT_WHITELIST }}"
......@@ -788,14 +794,14 @@ lms_auth_config:
stores:
- NAME: 'split'
ENGINE: 'xmodule.modulestore.split_mongo.split_draft.DraftVersioningModuleStore'
DOC_STORE_CONFIG: "{{ edxapp_lms_doc_store_config }}"
DOC_STORE_CONFIG: "{{ edxapp_lms_split_doc_store_config }}"
OPTIONS:
default_class: 'xmodule.hidden_module.HiddenDescriptor'
fs_root: "{{ edxapp_course_data_dir }}"
render_template: 'edxmako.shortcuts.render_to_string'
- NAME: 'draft'
ENGINE: 'xmodule.modulestore.mongo.DraftMongoModuleStore'
DOC_STORE_CONFIG: "{{ edxapp_lms_doc_store_config }}"
DOC_STORE_CONFIG: "{{ edxapp_lms_draft_doc_store_config }}"
OPTIONS:
default_class: 'xmodule.hidden_module.HiddenDescriptor'
fs_root: "{{ edxapp_course_data_dir }}"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment