lib/qpush/server/launcher.rb in qpush-0.1.2 vs lib/qpush/server/launcher.rb in qpush-0.1.4
- old
+ new
@@ -10,11 +10,11 @@
# Parses commmand line options and starts the Manager object
#
def start
start_message
setup_options
- require_jobs
+ setup_jobs
boot_manager
end
private
@@ -37,13 +37,13 @@
o.on('-h', '--help', 'Prints this help') { puts o && exit }
end
parser.parse!(@argv)
end
- def require_jobs
- Dir[Dir.pwd + "#{QPush.config.jobs_path}/**/*.rb"].each do |file|
- require file
- end
+ # Requires all base jobs as well as user jobs.
+ #
+ def setup_jobs
+ Loader.call
end
def boot_manager
manager = Manager.new(QPush.config.manager_options)
manager.start