Module: QueueToTheFuture

Defined in:
lib/queue_to_the_future.rb,
lib/queue_to_the_future/job.rb,
lib/queue_to_the_future/coordinator.rb

Defined Under Namespace

Classes: Coordinator, Job

Class Method Summary collapse

Class Method Details

.maximum_workersFixnum

The maximum number of workers to create for processing jobs.

Returns:

  • (Fixnum)

    Default is 15



17
18
19
# File 'lib/queue_to_the_future.rb', line 17

def self.maximum_workers
  @@maximum_workers ||= 15
end

.maximum_workers=(number) ⇒ Fixnum

Setter method for maximum_workers

Parameters:

  • number (Fixnum)

    Any integer greater than 0

Returns:

  • (Fixnum)

    number given

Raises:

  • (StandardError)

    If the number given is less than 1



26
27
28
29
# File 'lib/queue_to_the_future.rb', line 26

def self.maximum_workers=(number)
  raise StandardError.new("Bad workforce size: #{number}. Must be at least 1.") unless (number = number.to_i) >= 1
  @@maximum_workers = number
end

.VERSIONObject

Returns the current version of QueueToTheFuture



10
11
12
# File 'lib/queue_to_the_future.rb', line 10

def self.VERSION
  @@version ||= open(File.join(File.dirname(__FILE__), '..', 'VERSION')).read.strip
end