Browse files

Add doc on how to pass data back from the job

  • Loading branch information...
1 parent 3216bc3 commit fcb24307897af1d356c6819915701df245f566a6 @thbar thbar committed with Sep 7, 2010
Showing with 15 additions and 0 deletions.
  1. +15 −0 README.rdoc
@@ -94,6 +94,21 @@ Its also possible to get a list of current/recent job statuses:
Resque::Status.statuses #=> [#<Resque::Status>, ...]
+=== Passing back data from the job
+You may want to save data from inside the job to access it from outside the job.
+A common use-case is web-triggered jobs that create files, later available for
+download by the user.
+A Status is actually just a hash, so inside a job you can do:
+ status['filename'] = '/myfilename'
+Also, all the status setting methods take any number of hash arguments. So you could do:
+ complete('filename' => '/myfilename')
=== Kill! Kill! Kill!
Because we're tracking UUIDs per instance, and we're checking in/updating the status

0 comments on commit fcb2430

Please sign in to comment.