Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
C
cs_comments_service
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
cs_comments_service
Commits
f533496a
Commit
f533496a
authored
Jan 17, 2017
by
Robert Raposa
Committed by
GitHub
Jan 17, 2017
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #224 from edx/robrap/fix-rebuild-ficus
TNL-6296: Fixes rake search:rebuild for ficus. (new)
parents
6773ec63
0d279d9a
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
22 deletions
+4
-22
Rakefile
+3
-21
lib/tasks/search.rake
+1
-1
No files found.
Rakefile
View file @
f533496a
...
@@ -4,9 +4,6 @@ require 'bundler'
...
@@ -4,9 +4,6 @@ require 'bundler'
Bundler
.
setup
Bundler
.
setup
Bundler
.
require
Bundler
.
require
application_yaml
=
ERB
.
new
(
File
.
read
(
'config/application.yml'
)).
result
()
begin
begin
require
'rspec/core/rake_task'
require
'rspec/core/rake_task'
...
@@ -17,28 +14,13 @@ rescue LoadError
...
@@ -17,28 +14,13 @@ rescue LoadError
# no rspec available
# no rspec available
end
end
Tire
.
configure
do
url
YAML
.
load
(
application_yaml
)[
'elasticsearch_server'
]
end
LOG
=
Logger
.
new
(
STDERR
)
LOG
=
Logger
.
new
(
STDERR
)
desc
'Load the environment'
desc
'Load the environment'
task
:environment
do
task
:environment
do
environment
=
ENV
[
'SINATRA_ENV'
]
||
'development'
# Load all of app.rb, because it is too easy to introduce bugs otherwise where Rake
Sinatra
::
Base
.
environment
=
environment
# does not have a fix or config that is added to app.rb.
Mongoid
.
load!
(
'config/mongoid.yml'
)
require
File
.
dirname
(
__FILE__
)
+
'/app.rb'
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
}
end
end
Dir
.
glob
(
'lib/tasks/*.rake'
).
each
{
|
r
|
import
r
}
Dir
.
glob
(
'lib/tasks/*.rake'
).
each
{
|
r
|
import
r
}
...
...
lib/tasks/search.rake
View file @
f533496a
...
@@ -71,7 +71,7 @@ namespace :search do
...
@@ -71,7 +71,7 @@ namespace :search do
# NOTE on the small chance that another process re-auto-creates the index
# 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
# we just deleted before we have a chance to create the alias, this next
# call will fail.
# call will fail.
move_alias_to
(
Content
::
ES_INDEX_NAME
,
new_index
_name
)
move_alias_to
(
Content
::
ES_INDEX_NAME
,
new_index
)
end
end
op
=
in_place
?
'reindex'
:
'(re)build index'
op
=
in_place
?
'reindex'
:
'(re)build index'
...
...
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