Module: Beehive

Defined in:
lib/beehive.rb,
lib/beehive/client.rb,
lib/beehive/worker.rb,
lib/beehive/version.rb

Overview

Beehive is a lightweight queue system that uses Redis to store all jobs. It’s inspired by existing systems such as Minion and Stalker. Beehive does not offer a plugin system or any other fancy features, it merely allows you to queue a job and have it processed in the background.

## Features

  • Uses Redis as it’s storage mechanism.

  • Lightweight: workers don’t waste resources on loading large amounts of libraries.

  • Easy to use

Fore more information see the README file.

Author:

  • Yorick Peterse

Since:

  • 0.1

Defined Under Namespace

Classes: Client, Worker

Constant Summary collapse

Jobs =

Hash containing all the defined jobs.

Author:

  • Yorick Peterse

Since:

  • 0.1

{}
Version =

The current version of Beehive.

Author:

  • Yorick Peterse

Since:

  • 0.1

'0.1.3'

Class Method Summary collapse

Class Method Details

.job(job, &block) ⇒ Object

Adds a new job to the list.

Examples:

Beehive.job('video') do |params|
  puts "Hello!"
end

Parameters:

  • job (String)

    The name of the job.

  • block (Proc)

    The block to call whenever the job has to be processed.

Author:

  • Yorick Peterse

Since:

  • 0.1



48
49
50
# File 'lib/beehive.rb', line 48

def self.job(job, &block)
  Jobs[job.to_s] = block
end