Skip to content

treeder/delayed_job_ironmq_example

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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.

About

An example Rails application that uses the delayed_job_ironmq gem.

Resources

Stars

Watchers

Forks

Releases

No releases published

Sponsor this project

 

Packages

No packages published