module Procrastinator

Top-level module for the Procrastinator Gem.

Call Procrastinator.setup with a block to initialize and run independent worker sub processes to complete tasks asynchronously from your main application.

Read the README for details.

@author Robin Miller

@see github.com/TenjinInc/procrastinator

Constants

VERSION

Public Class Methods

setup(&block) click to toggle source

Creates a configuration object and passes it into the given block.

@yield the created configuration object

# File lib/procrastinator.rb, line 44
def self.setup(&block)
   raise ArgumentError, 'Procrastinator.setup must be given a block' unless block_given?

   config = Config.new

   config.setup(@@test_mode, &block)

   QueueManager.new(config).spawn_workers
end
test_mode() click to toggle source
# File lib/procrastinator.rb, line 35
def self.test_mode
   @@test_mode
end
test_mode=(value) click to toggle source
# File lib/procrastinator.rb, line 31
def self.test_mode=(value)
   @@test_mode = value
end