bricks/worker/misc/tasks.rb in zena-0.16.4 vs bricks/worker/misc/tasks.rb in zena-0.16.5
- old
+ new
@@ -63,6 +63,22 @@
task :restart do
worker.stop
sleep(1)
worker.start
end
+
+ desc "Run worker jobs index requests (never returns)"
+ task :run => :environment do
+ require 'delayed/worker'
+ begin
+ require 'thinking_sphinx/deltas/delayed_delta'
+ rescue LoadError
+ # Ignore
+ end
+
+ Delayed::Worker.new(
+ :min_priority => ENV['MIN_PRIORITY'],
+ :max_priority => ENV['MAX_PRIORITY']
+ ).start
+ end
+
end
\ No newline at end of file