Permalink
Browse files

Removing duplicate of rake tasks, cleaning up railtie.

  • Loading branch information...
1 parent 9d0ac32 commit f7979e638cea5311118b3a72fc41cef8161cca51 @pat pat committed Nov 26, 2011
View
@@ -13,7 +13,7 @@ In your @environment.rb@ file, with the rest of your gem dependencies:
:version => '>= 1.0.0',
:source => 'http://gemcutter.org'</code></pre>
-And add the following line to the bottom of your @Rakefile@:
+And add the following line to the bottom of your @Rakefile@ if you're not using Rails 3 or newer:
<pre><code>require 'thinking_sphinx/deltas/delayed_delta/tasks'</code></pre>
@@ -1,14 +1,5 @@
-module ThinkingSphinx
- module Deltas
-
- class DelayedDelta::Railtie < Rails::Railtie
- engine_name :ts_delayed_delta
-
- rake_tasks do
- load "thinking_sphinx/deltas/delayed_delta/railties/tasks.rake"
- end
- end
-
+class ThinkingSphinx::Deltas::DelayedDelta::Railtie < Rails::Railtie
+ rake_tasks do
+ load 'thinking_sphinx/deltas/delayed_delta/tasks.rb'
end
end
-
@@ -1,23 +0,0 @@
-namespace :thinking_sphinx do
- task :index do
- require 'thinking_sphinx/deltas/delayed_delta'
- ThinkingSphinx::Deltas::Job.cancel_thinking_sphinx_jobs
- end
-
- desc "Process stored delta index requests"
- task :delayed_delta => :app_env do
- require 'delayed_job'
- require 'delayed/worker'
- require 'thinking_sphinx/deltas/delayed_delta'
- Delayed::Worker.new(
- :min_priority => ENV['MIN_PRIORITY'],
- :max_priority => ENV['MAX_PRIORITY']
- ).start
- end
-end
-
-namespace :ts do
- desc "Process stored delta index requests"
- task :dd => "thinking_sphinx:delayed_delta"
-end
-
@@ -1,13 +1,15 @@
namespace :thinking_sphinx do
task :index do
+ require 'thinking_sphinx/deltas/delayed_delta'
ThinkingSphinx::Deltas::Job.cancel_thinking_sphinx_jobs
end
-
+
desc "Process stored delta index requests"
task :delayed_delta => :app_env do
+ require 'delayed_job'
require 'delayed/worker'
require 'thinking_sphinx/deltas/delayed_delta'
-
+
Delayed::Worker.new(
:min_priority => ENV['MIN_PRIORITY'],
:max_priority => ENV['MAX_PRIORITY']

0 comments on commit f7979e6

Please sign in to comment.