Skip to content

Commit

Permalink
Tell DataMapper folks to run auto_upgrade
Browse files Browse the repository at this point in the history
  • Loading branch information
bkeepers committed Mar 27, 2010
1 parent d98d6e4 commit 39bfbe8
Showing 1 changed file with 16 additions and 4 deletions.
20 changes: 16 additions & 4 deletions README.textile
Expand Up @@ -40,20 +40,32 @@ After delayed_job is installed, you will need to setup the backend.

h2. Backends

delayed_job supports multiple backends for storing the job queue. There are currently implementations for Active Record, MongoMapper, and DataMapper. The default is Active Record, which requires a jobs table.
delayed_job supports multiple backends for storing the job queue. There are currently implementations for Active Record, MongoMapper, and DataMapper.

h3. Active Record

The default is Active Record, which requires a jobs table.

<pre>
script/generate delayed_job
rake db:migrate
$ script/generate delayed_job
$ rake db:migrate
</pre>

You can change the backend in an initializer:
h3. MongoMapper

<pre>
# config/initializers/delayed_job.rb
Delayed::Worker.backend = :mongo_mapper
</pre>

h3. DataMapper

<pre>
# config/initializers/delayed_job.rb
Delayed::Worker.backend = :data_mapper
Delayed::Worker.backend.auto_upgrade!
</pre>

h2. Queuing Jobs

Call @#send_later(method, params)@ on any object and it will be processed in the background.
Expand Down

0 comments on commit 39bfbe8

Please sign in to comment.