Skip to content

Commit fedbe17

Browse files
committed
Attempt to preload files under app/ when using Rails
1 parent 8c9be28 commit fedbe17

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

lib/resque/tasks.rb

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,3 +40,10 @@
4040
threads.each { |thread| thread.join }
4141
end
4242
end
43+
44+
# Preload app files
45+
task :environment do
46+
Dir['app/**/*.rb'].each do |file|
47+
require file
48+
end
49+
end

0 commit comments

Comments
 (0)