diff options
author | Vipul A M <vipulnsward@gmail.com> | 2016-04-20 00:48:27 +0530 |
---|---|---|
committer | Vipul A M <vipulnsward@gmail.com> | 2016-04-20 00:48:27 +0530 |
commit | 5fa91521839cc91096c24c05783b9e9b3b9b0f2a (patch) | |
tree | 8b30bb22f582fe56dacf8db6f6644dfee2545c91 | |
parent | 406a2380b88714387e015efcc0696bd2b20f49f1 (diff) | |
parent | 99af5fe26150253046af1c9aa5ea4507199fd4cf (diff) | |
download | rails-5fa91521839cc91096c24c05783b9e9b3b9b0f2a.tar.gz rails-5fa91521839cc91096c24c05783b9e9b3b9b0f2a.tar.bz2 rails-5fa91521839cc91096c24c05783b9e9b3b9b0f2a.zip |
Merge pull request #24635 from mohitnatoo/doc-queue-adapter
Added documentation for ActiveJob queue adapter for a specific job. [ci skip]
-rw-r--r-- | guides/source/active_job_basics.md | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/guides/source/active_job_basics.md b/guides/source/active_job_basics.md index d8ea1ee079..d6de92ace6 100644 --- a/guides/source/active_job_basics.md +++ b/guides/source/active_job_basics.md @@ -138,6 +138,18 @@ module YourApp end ``` +You can also configure your backend on a per job basis. + +```ruby +class GuestsCleanupJob < ActiveJob::Base + self.queue_adapter = :resque + #.... +end + +# Now your job will use `resque` as it's backend queue adapter overriding what +# was configured in `config.active_job.queue_adapter`. +``` + ### Starting the Backend Since jobs run in parallel to your Rails application, most queuing libraries |