diff options
Diffstat (limited to 'README.md')
-rw-r--r-- | README.md | 11 |
1 files changed, 9 insertions, 2 deletions
@@ -10,6 +10,13 @@ that makes it easy to turn any mailing into a job for running later. That's one of the most common jobs in a modern web application: Sending emails outside of the request-response cycle, so the user doesn't have to wait on it. +The main point is to ensure that all Rails apps will have a job infrastructure +in place, even if it's in the form of an "immediate runner". We can then have +framework features and other gems build on top of that, without having to worry +about API differences between Delayed Job and Resque. Picking your queuing +backend becomes more of an operational concern, then. And you'll be able to +switch between them without having to rewrite your jobs. + ## Usage @@ -40,7 +47,7 @@ you then have to manually deserialize. Before, jobs would look like this: ```ruby class TrashableCleanupJob - def perfom(trashable_class, trashable_id, depth) + def perform(trashable_class, trashable_id, depth) trashable = trashable_class.constantize.find(trashable_id) trashable.cleanup(depth) end @@ -51,7 +58,7 @@ Now you can simply do: ```ruby class TrashableCleanupJob - def perfom(trashable, depth) + def perform(trashable, depth) trashable.cleanup(depth) end end |