Sha256: 180c8e26a3ab20e361bf9c05136368b144afa42165b11e1ac2f32ba4dce12504

Contents?: true

Size: 1.23 KB

Versions: 2

Compression:

Stored size: 1.23 KB

Contents

# Afterparty

[![Build Status](https://travis-ci.org/hstove/afterparty.png?branch=master)](https://travis-ci.org/hstove/afterparty)

A Rails 4 compatible queue with support for executing jobs in the future and persistence with Redis.

## Installation

Make sure you've installed [redis](http://redis.io) on your machine.

Add this line to your application's Gemfile:

~~~Ruby
gem 'afterparty'
~~~

And then execute:

    $ bundle

Or install it yourself as:

    $ gem install afterparty

In your desired application environment, like `application.rb`:

~~~Ruby
config.queue = Afterparty::RedisQueue.new
~~~

## Usage

A `job` is a ruby object with a `run` method.

~~~Ruby
class Job
  def run
    puts "Hello!"
  end
end
~~~

Then add it to the queue at any time.

~~~Ruby
Rails.configuration.queue << Job.new
~~~

If your job responds to an `execute_at` method, the queue will wait to process that job until the specified time.

## Contributing

1. Fork it
2. Create your feature branch (`git checkout -b my-new-feature`)
3. Add a test in `spec/redis_queue_spec.rb`
4. Make sure tests pass when you run `rake`
3. Commit your changes (`git commit -am 'Add some feature'`)
4. Push to the branch (`git push origin my-new-feature`)
5. Create new Pull Request

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
afterparty-0.0.4 README.md
afterparty-0.0.3 README.md