Skip to content

wireframe/backgrounded-resque

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Backgrounded

The cleanest way to integrate background processing into your application.

Backgrounded provides a thin wrapper around any background processing framework that implements the Backgrounded handler API which makes it trivial to swap out processing frameworks with no impact to your code.

This library is an extension which add support for the Resque job processing framework see github.com/defunkt/resque/

Features

  • execute class or instance level methods within resque background workers

  • supports enqueing jobs into custom queues

Installation

Bundler Gemfile configuration

gem 'backgrounded-resque'

Backgrounded Configuration

# config/initializers/backgrounded.rb
require 'backgrounded/handler/resque_handler'
Backgrounded.handler = Backgrounded::Handler::ResqueHandler.new

Usage

user = User.new

# perform work on the default backgrounded queue
user.backgrounded.do_something

# perform work on a custom queue
user.backgrounded(:queue => 'custom').do_something_else

Copyright © 2012 Ryan Sonnek. See LICENSE for details.

About

Backgrounded handler for enqueing jobs into resque

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages