lib/rocket_job/worker.rb in rocketjob-1.1.3 vs lib/rocket_job/worker.rb in rocketjob-1.2.0
- old
+ new
@@ -100,10 +100,12 @@
worker = new(attrs)
worker.build_heartbeat
worker.save!
create_indexes
register_signal_handlers
- raise 'The RocketJob configuration is being applied after the system has been initialized' unless RocketJob::Job.database.name == RocketJob::SlicedJob.database.name
+ if defined?(RocketJobPro) && (RocketJob::Job.database.name != RocketJob::SlicedJob.database.name)
+ raise 'The RocketJob configuration is being applied after the system has been initialized'
+ end
logger.info "Using MongoDB Database: #{RocketJob::Job.database.name}"
worker.run
end
# Create indexes