diff options
author | Robin Dupret <robin.dupret@gmail.com> | 2014-10-31 19:46:43 +0100 |
---|---|---|
committer | Robin Dupret <robin.dupret@gmail.com> | 2014-10-31 19:48:42 +0100 |
commit | aeb431a6ca7cd05f8d29f454a24bf8f5bd5423ae (patch) | |
tree | 317583b2781739a5fd067f6599d4b36bf62af5e2 /guides/source | |
parent | c1a118abc43453e98ba3be06e7f1fbc4afb06d4e (diff) | |
download | rails-aeb431a6ca7cd05f8d29f454a24bf8f5bd5423ae.tar.gz rails-aeb431a6ca7cd05f8d29f454a24bf8f5bd5423ae.tar.bz2 rails-aeb431a6ca7cd05f8d29f454a24bf8f5bd5423ae.zip |
Tiny documentation improvements [ci skip]
Diffstat (limited to 'guides/source')
-rw-r--r-- | guides/source/active_job_basics.md | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/guides/source/active_job_basics.md b/guides/source/active_job_basics.md index 875919e237..de69ab3211 100644 --- a/guides/source/active_job_basics.md +++ b/guides/source/active_job_basics.md @@ -172,15 +172,15 @@ end # environment ``` -If you want more control on what queue a job will be run you can pass a :queue -option to #set: +If you want more control on what queue a job will be run you can pass a `:queue` +option to `#set`: ```ruby MyJob.set(queue: :another_queue).perform_later(record) ``` -To control the queue from the job level you can pass a block to queue_as. The -block will be executed in the job context (so you can access self.arguments) +To control the queue from the job level you can pass a block to `#queue_as`. The +block will be executed in the job context (so you can access `self.arguments`) and you must return the queue name: ```ruby @@ -202,7 +202,6 @@ end ProcessVideoJob.perform_later(Video.last) ``` - NOTE: Make sure your queueing backend "listens" on your queue name. For some backends you need to specify the queues to listen to. |