Permalink
Browse files

Tell DataMapper folks to run auto_upgrade

  • Loading branch information...
1 parent d98d6e4 commit 39bfbe8ac454eaf6bc373b9dd3308ba5d3003de5 @bkeepers bkeepers committed Mar 27, 2010
Showing with 16 additions and 4 deletions.
  1. +16 −4 README.textile
View
@@ -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.

0 comments on commit 39bfbe8

Please sign in to comment.