Oneshot

class
Superclass
Symphony::TaskGroup

A task group for the 'oneshot' work model.

Public Instance Methods

anchor
adjust_workers()

If the number of workers is not at the maximum, start some.

# File lib/symphony/task_group/oneshot.rb, line 10
def adjust_workers
        return nil if self.throttled?

        missing_workers = []
        missing_count = self.max_workers - self.workers.size
        missing_count.times do
                missing_workers << self.start_worker
        end

        return missing_workers.empty? ? nil : missing_workers
end