lib/rocket_job/config.rb in rocketjob-1.0.0 vs lib/rocket_job/config.rb in rocketjob-1.1.0

- old
+ new

@@ -12,20 +12,21 @@ # Returns the single instance of the Rocket Job Configuration for this site # in a thread-safe way sync_cattr_reader(:instance) do begin first || create - rescue Exception => exc + rescue StandardError # In case another process has already created the first document first end end # By enabling inline_mode jobs will be called in-line # No worker processes will be created, nor threads created sync_cattr_accessor(:inline_mode) { false } + # @formatter:off # The maximum number of worker threads to create on any one worker key :max_worker_threads, Integer, default: 10 # Number of seconds between heartbeats from Rocket Job Worker processes key :heartbeat_seconds, Integer, default: 15 @@ -45,9 +46,10 @@ key :re_check_seconds, Integer, default: 60 # Limit the number of workers per job class per worker # 'class_name' / group => 100 #key :limits, Hash + # @formatter:on # Replace the MongoMapper default mongo connection for holding jobs def self.mongo_connection=(connection) connection(connection) Worker.connection(connection)