Skip to content

Commit e35bbab

Browse files
committed
Only preload Rails app/ dir in production
1 parent b48f614 commit e35bbab

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/resque/tasks.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@
4242

4343
# Preload app files if this is Rails
4444
task :preload => :setup do
45-
if defined? Rails
45+
if defined?(Rails) && Rails.env == 'production'
4646
Dir["#{Rails.root}/app/**/*.rb"].each do |file|
4747
require file
4848
end

0 commit comments

Comments
 (0)