An example Rails application that uses the delayed_job_ironmq gem.
Ruby JavaScript
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
app
config
db
doc
lib
public
script
test
vendor
.gitignore
Gemfile
Gemfile.lock
README.md
Rakefile
config.ru

README.md

Getting Started

1. Setup your Iron.io Credentials and Project ID

If you haven't already, read this page to set up your credentials: http://dev.iron.io/articles/configuration/

To choose a specific project for this, add an iron.json file in this directory with:

{
    "project_id": "MY_IRON_PROJECT_ID"
}

Or set the IRON_PROJECT_ID environment variable.

Or if you're using the IronMQ Heroku add-on, you don't need to do either of those.

2. Start the app

Clone this github repository then start up the app with:

rails s

3. Start a DJ process

rake jobs:work

4. Surf to localhost:3000

And watch the worker output on the console.

What's Going On?

Take a look at WelcomeController.index and User model to see what's going on. In WelcomeController.index it's calling:

user = User.new
user.delay.background_stuff(WelcomeController.increment)

So User.background_stuff is being called in the background.