Permalink
Browse files

+ procrastinate gem handling (one warning, then single processor inde…

…xing)
  • Loading branch information...
1 parent 705dd52 commit adcdcae89c2a9d688efe061581614d5b56de3046 Florian René Hanke committed Oct 16, 2012
Showing with 5 additions and 2 deletions.
  1. +0 −1 server/lib/picky.rb
  2. +5 −1 server/lib/picky/scheduler.rb
View
@@ -24,7 +24,6 @@ class << self
require 'active_support/core_ext/enumerable'
require 'active_support/multibyte'
require 'multi_json'
- require 'procrastinate'
require 'rack_fast_escape' if defined? Rack
require 'fileutils'
@@ -43,9 +43,13 @@ def fork?
require 'procrastinate'
parallel && Process.respond_to?(:fork)
rescue LoadError => e
- warn_gem_missing 'procrastinate', 'parallelized indexing (with the procrastinate gem)'
+ warn_procrastinate_missing
return false
end
+ def warn_procrastinate_missing
+ warn_gem_missing 'Procrastinate', 'parallelized indexing (with the procrastinate gem)' unless @gem_missing_warned
+ @gem_missing_warned = true
+ end
end

0 comments on commit adcdcae

Please sign in to comment.