lib/rocket_job/server.rb in rocketjob-3.2.1 vs lib/rocket_job/server.rb in rocketjob-3.3.0
- old
+ new
@@ -90,12 +90,12 @@
end
# Requeue any jobs being worked by this server when it is destroyed
before_destroy :requeue_jobs
- # Destroy's all instances of zombie server and requeue any jobs still "running"
- # on those servers
+ # Destroy's all instances of zombie servers and requeues any jobs still "running"
+ # on those servers.
def self.destroy_zombies
count = 0
each do |server|
next unless server.zombie?
logger.warn "Destroying zombie server #{server.name}, and requeueing its jobs"
@@ -157,30 +157,30 @@
# On MRI the 'concurrent-ruby-ext' gem may not be loaded
if defined?(Concurrent::JavaAtomicBoolean) || defined?(Concurrent::CAtomicBoolean)
# Returns [true|false] whether the shutdown indicator has been set for this server process
def self.shutdown?
- @@shutdown.value
+ @shutdown.value
end
# Set shutdown indicator for this server process
def self.shutdown!
- @@shutdown.make_true
+ @shutdown.make_true
end
- @@shutdown = Concurrent::AtomicBoolean.new(false)
+ @shutdown = Concurrent::AtomicBoolean.new(false)
else
# Returns [true|false] whether the shutdown indicator has been set for this server process
def self.shutdown?
- @@shutdown
+ @shutdown
end
# Set shutdown indicator for this server process
def self.shutdown!
- @@shutdown = true
+ @shutdown = true
end
- @@shutdown = false
+ @shutdown = false
end
# Run the server process
# Attributes supplied are passed to #new
def self.run(attrs = {})