class Chimp::SerialExecutionGroup
SerialExecutionGroup: run only one job at a time
Public Instance Methods
ready?()
click to toggle source
# File lib/right_chimp/queue/execution_group.rb, line 274 def ready? # Make sure only one thread makes the ready question at the same time, # otherwise we can run into race conditions. This is critical for SerialExecutionGroup ChimpDaemon.instance.semaphore.synchronize do ready = get_jobs_by_status(Executor::STATUS_RUNNING).size == 0 && get_jobs_by_status(Executor::STATUS_NONE).size > 0 return ready end end
short_name()
click to toggle source
# File lib/right_chimp/queue/execution_group.rb, line 283 def short_name 'S' end