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
ae31222b
Commit
ae31222b
authored
Aug 15, 2012
by
Rocky Duan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
task to reindex
parent
e32f8e54
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
54 deletions
+4
-54
Rakefile
+4
-54
No files found.
Rakefile
View file @
ae31222b
...
...
@@ -227,62 +227,12 @@ namespace :db do
puts
"Time elapsed
#{
(
end_time
-
beginning_time
)
*
1000
}
milliseconds"
end
end
# copied from https://github.com/sunspot/sunspot/blob/master/sunspot_solr/lib/sunspot/solr/tasks.rb
namespace
:sunspot
do
namespace
:solr
do
desc
'Start the Solr instance'
task
:start
=>
:environment
do
case
RUBY_PLATFORM
when
/w(in)?32$/
,
/java$/
abort
(
"This command is not supported on
#{
RUBY_PLATFORM
}
. "
+
"Use rake sunspot:solr:run to run Solr in the foreground."
)
end
Sunspot
::
Solr
::
Server
.
new
.
start
puts
"Successfully started Solr ..."
end
desc
'Run the Solr instance in the foreground'
task
:run
=>
:environment
do
Sunspot
::
Solr
::
Server
.
new
.
run
end
desc
'Stop the Solr instance'
task
:stop
=>
:environment
do
case
RUBY_PLATFORM
when
/w(in)?32$/
,
/java$/
abort
(
"This command is not supported on
#{
RUBY_PLATFORM
}
. "
+
"Use rake sunspot:solr:run to run Solr in the foreground."
)
end
Sunspot
::
Solr
::
Server
.
new
.
stop
puts
"Successfully stopped Solr ..."
end
desc
'Restart the Solr instance'
task
:restart
=>
:environment
do
case
RUBY_PLATFORM
when
/w(in)?32$/
,
/java$/
abort
(
"This command is not supported on
#{
RUBY_PLATFORM
}
. "
+
"Use rake sunspot:solr:run to run Solr in the foreground."
)
end
Sunspot
::
Solr
::
Server
.
new
.
stop
Sunspot
::
Solr
::
Server
.
new
.
start
puts
"Successfully restarted Solr ..."
end
end
task
:commit
=>
:environment
do
Sunspot
.
commit
task
:reindex_search
=>
:environment
do
Tire
.
index
(
'comment_threads'
).
delete
CommentThread
.
create_elasticsearch_index
Tire
.
index
(
'comment_threads'
)
{
import
CommentThread
.
all
}
end
end
namespace
:jobs
do
...
...
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