lib/resque/tasks.rb in resque-1.18.4 vs lib/resque/tasks.rb in resque-1.18.5
- old
+ new
@@ -40,10 +40,10 @@
threads.each { |thread| thread.join }
end
# Preload app files if this is Rails
task :preload => :setup do
- if defined? Rails
+ if defined?(Rails) && Rails.env == 'production'
Dir["#{Rails.root}/app/**/*.rb"].each do |file|
require file
end
end
end