lib/rocket_job/cli.rb in rocketjob-3.0.0.rc5 vs lib/rocket_job/cli.rb in rocketjob-3.0.0
- old
+ new
@@ -30,9 +30,12 @@
setup_environment
setup_logger
rails? ? boot_rails : boot_standalone
write_pidfile
+ # In case Rails did not load the Mongoid Config
+ RocketJob::Config.load!(environment, mongo_config, symmetric_encryption_config) if Mongoid::Config.clients.empty?
+
opts = {}
opts[:name] = name if name
opts[:max_workers] = workers if workers
opts[:filter] = {:_type => filter} if filter
Server.run(opts)