Skip to content


Subversion checkout URL

You can clone with
Download ZIP
branch: master
Fetching contributors…

Cannot retrieve contributors at this time

46 lines (32 sloc) 1.481 kB
This is Async Observer -- a Rails plugin that provides deep integration with
Beanstalk. It is also a Merb plugin, based on code by Chris Van Pelt.
For more information, see
For more information on Beanstalk, see its home page at
In your enviroment file (either config/environment.rb, or the environment-
specific config files), add the following lines:
AsyncObserver::Queue.queue =
AsyncObserver::Queue.app_version = '1.0'
app_version should ideally be something that changes each time you update
your code. should of course attempt to connect to
wherever your beanstalkd server is listening.
In init.rb, register the dependency in a before_app_loads block, like so:
Merb::BootLoader.before_app_loads do
dependency 'async_observer'
This will occur after you have selected your ORM, which will then be auto-
detected. Note that only ActiveRecord and DataMapper are currently supported.
Then, as above for Rails, connect to your Beanstalk server in the
after_app_loads block:
Merb::Bootloader.after_app_loads do
AsyncObserver::Queue.queue =
AsyncObserver::Queue.app_version = '1.0'
If you intend to use async_each with DataMapper, you will need to add a
dependency on the dm-aggregates library, from dm-more.
Jump to Line
Something went wrong with that request. Please try again.