Commit 4e839bb3 by Jillian Vogel

Add optional task to rebuild the forum elasticsearch index

set FORUM_REBUILD_INDEX to run the rebuild_index rake task.

(cherry picked from commit d07e6fca)
parent cb4fba66
- Role: forum
- Added `FORUM_REBUILD_INDEX` to rebuild the ElasticSearch index from the database, when enabled. Default: `False`.
- Role: edxapp
- Let `confirm_email` in `EDXAPP_REGISTRATION_EXTRA_FIELDS` default to `"hidden"`.
- Let `terms_of_service` in `EDXAPP_REGISTRATION_EXTRA_FIELDS` default to `"hidden"`.
......
......@@ -45,6 +45,9 @@ FORUM_USE_TCP: false
# wait this long before attempting to restart it
FORUM_RESTART_DELAY: 60
# Set to rebuild the forum ElasticSearch index from the database.
FORUM_REBUILD_INDEX: false
forum_environment:
RBENV_ROOT: "{{ forum_rbenv_root }}"
GEM_HOME: "{{ forum_gem_root }}"
......
......@@ -71,6 +71,17 @@
- migrate
- migrate:db
- name: rebuild elasticsearch indexes
command: "{{ forum_code_dir }}/bin/rake search:rebuild_index"
args:
chdir: "{{ forum_code_dir }}"
become_user: "{{ forum_user }}"
environment: "{{ forum_environment }}"
when: migrate_db is defined and migrate_db|lower == "yes" and FORUM_REBUILD_INDEX|bool
tags:
- migrate
- migrate:db
# call supervisorctl update. this reloads
# the supervisorctl config and restarts
# the services if any of the configurations
......
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