1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00

Fixed spacing issues on code comments in ActiveJob Basics guide.

Before: http://take.ms/z39h2
After: http://take.ms/Mo0G3
This commit is contained in:
Vipul A M 2015-01-14 11:47:24 +05:30
parent de40b87e61
commit 34dc028e75

View file

@ -78,7 +78,8 @@ end
Enqueue a job like so: Enqueue a job like so:
```ruby ```ruby
# Enqueue a job to be performed as soon the queueing system is free. # Enqueue a job to be performed as soon the queueing system is
# free.
MyJob.perform_later record MyJob.perform_later record
``` ```
@ -114,8 +115,9 @@ You can easily set your queueing backend:
# config/application.rb # config/application.rb
module YourApp module YourApp
class Application < Rails::Application class Application < Rails::Application
# Be sure to have the adapter's gem in your Gemfile and follow # Be sure to have the adapter's gem in your Gemfile
# the adapter's specific installation and deployment instructions. # and follow the adapter's specific installation
# and deployment instructions.
config.active_job.queue_adapter = :sidekiq config.active_job.queue_adapter = :sidekiq
end end
end end
@ -153,8 +155,8 @@ class GuestsCleanupJob < ActiveJob::Base
end end
# Now your job will run on queue production_low_priority on your # Now your job will run on queue production_low_priority on your
# production environment and on staging_low_priority on your staging # production environment and on staging_low_priority
# environment # on your staging environment
``` ```
The default queue name prefix delimiter is '\_'. This can be changed by setting The default queue name prefix delimiter is '\_'. This can be changed by setting
@ -176,8 +178,8 @@ class GuestsCleanupJob < ActiveJob::Base
end end
# Now your job will run on queue production.low_priority on your # Now your job will run on queue production.low_priority on your
# production environment and on staging.low_priority on your staging # production environment and on staging.low_priority
# environment # on your staging environment
``` ```
If you want more control on what queue a job will be run you can pass a `:queue` If you want more control on what queue a job will be run you can pass a `:queue`