Module: Procrastinator

Defined in:
lib/procrastinator.rb,
lib/procrastinator/task.rb,
lib/procrastinator/queue.rb,
lib/procrastinator/config.rb,
lib/procrastinator/version.rb,
lib/procrastinator/scheduler.rb,
lib/procrastinator/test/mocks.rb,
lib/procrastinator/logged_task.rb,
lib/procrastinator/queue_worker.rb,
lib/procrastinator/task_meta_data.rb,
lib/procrastinator/rake/daemon_tasks.rb,
lib/procrastinator/task_store/file_transaction.rb,
lib/procrastinator/task_store/simple_comma_store.rb

Overview

Top-level module for the Procrastinator Gem.

Call Procrastinator.setup with a block to configure task queues.

See README for details.

See Also:

Author:

  • Robin Miller

Defined Under Namespace

Modules: Rake, TaskStore, Test Classes: AmbiguousTaskFilterError, Config, FileTransaction, LoggedTask, MalformedTaskError, MalformedTaskPersisterError, MalformedTaskStoreError, NoSuchTaskError, Queue, QueueWorker, Scheduler, Task, TaskMetaData

Constant Summary collapse

VERSION =

Version number of this release

'2.0.0'

Class Method Summary collapse

Class Method Details

.setup { ... } ⇒ Scheduler

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

Yields:

  • the created configuration object

Returns:

  • (Scheduler)

    a scheduler object that can be used to interact with the queues

Raises:

  • (ArgumentError)


31
32
33
34
35
36
37
# File 'lib/procrastinator.rb', line 31

def self.setup(&block)
   raise ArgumentError, 'Procrastinator.setup must be given a block' unless block

   config = Config.new(&block)

   Scheduler.new(config)
end