Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
"Farm out" long-running methods as Heroku one-off processes.
Ruby
Tag: v0.0.4

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
lib
.gitignore
Gemfile
Gemfile.lock
MIT-LICENSE
README.md
farm.gemspec

README.md

Farm

"Farm out" background jobs by running them immediately as a one-off Heroku process. Only works with Rails >= 3.0.

Install:

gem install farm

Set the environment variables API_KEY and APP_NAME to your Heroku API key and the name of your app on Heroku, respectively.

Call with the farm method:

Foo.bar       #=> Run directly
Foo.farm.bar  #=> Run in background as one-off Heroku process.

For local development, set the environment variable FARM_ENV=local. This will cause background tasks to be run as local rake tasks, rather than one-off Heroku processes.

Sincere thanks to https://github.com/collectiveidea/delayed_job from which I copied lots of code and functionality.

Something went wrong with that request. Please try again.