From 86aac07d890c6ec87d9486e9580ecc87bc5dab26 Mon Sep 17 00:00:00 2001 From: David Underwood Date: Fri, 28 Jun 2013 12:37:52 -0400 Subject: Yo dawg, I heard you liked jobs so we added recursive loading to your job loader so you can have job subfolders in the job folder that contain jobs --- lib/dashing.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib') diff --git a/lib/dashing.rb b/lib/dashing.rb index 34e2cb5..dc62395 100644 --- a/lib/dashing.rb +++ b/lib/dashing.rb @@ -141,5 +141,5 @@ Dir[File.join(settings.root, 'lib', '**', '*.rb')].each {|file| require file } {}.to_json # Forces your json codec to initialize (in the event that it is lazily loaded). Does this before job threads start. job_path = ENV["JOB_PATH"] || 'jobs' -files = Dir[File.join(settings.root, job_path, '/*.rb')] +files = Dir[File.join(settings.root, job_path, '**', '/*.rb')] files.each { |job| require(job) } -- cgit v1.2.3