Commit f533496a by Robert Raposa Committed by GitHub

Merge pull request #224 from edx/robrap/fix-rebuild-ficus

TNL-6296: Fixes rake search:rebuild for ficus. (new)
parents 6773ec63 0d279d9a
......@@ -4,9 +4,6 @@ require 'bundler'
Bundler.setup
Bundler.require
application_yaml = ERB.new(File.read('config/application.yml')).result()
begin
require 'rspec/core/rake_task'
......@@ -17,28 +14,13 @@ rescue LoadError
# no rspec available
end
Tire.configure do
url YAML.load(application_yaml)['elasticsearch_server']
end
LOG = Logger.new(STDERR)
desc 'Load the environment'
task :environment do
environment = ENV['SINATRA_ENV'] || 'development'
Sinatra::Base.environment = environment
Mongoid.load!('config/mongoid.yml')
Mongoid.logger.level = Logger::INFO
module CommentService
class << self;
attr_accessor :config;
end
end
CommentService.config = YAML.load(application_yaml)
Dir[File.dirname(__FILE__) + '/lib/**/*.rb'].each { |file| require file }
Dir[File.dirname(__FILE__) + '/models/*.rb'].each { |file| require file }
# Load all of app.rb, because it is too easy to introduce bugs otherwise where Rake
# does not have a fix or config that is added to app.rb.
require File.dirname(__FILE__) + '/app.rb'
end
Dir.glob('lib/tasks/*.rake').each { |r| import r }
......
......@@ -71,7 +71,7 @@ namespace :search do
# NOTE on the small chance that another process re-auto-creates the index
# we just deleted before we have a chance to create the alias, this next
# call will fail.
move_alias_to(Content::ES_INDEX_NAME, new_index_name)
move_alias_to(Content::ES_INDEX_NAME, new_index)
end
op = in_place ? 'reindex' : '(re)build index'
......
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