From f9da785d0b1b22317cfca25c15fb555e9016accb Mon Sep 17 00:00:00 2001 From: Jeremy Kemper Date: Fri, 21 Dec 2012 15:42:47 -0800 Subject: Move background jobs to the 'jobs' branch until fully baked. Not shipping with Rails 4.0. --- guides/source/4_0_release_notes.md | 5 ----- guides/source/action_mailer_basics.md | 23 ----------------------- guides/source/configuring.md | 9 --------- 3 files changed, 37 deletions(-) (limited to 'guides') diff --git a/guides/source/4_0_release_notes.md b/guides/source/4_0_release_notes.md index 55ac4bca87..597ac99be0 100644 --- a/guides/source/4_0_release_notes.md +++ b/guides/source/4_0_release_notes.md @@ -5,7 +5,6 @@ Highlights in Rails 4.0: * Ruby 1.9.3 only * Strong Parameters -* Queue API * Turbolinks * Russian Doll Caching * Asynchronous Mailers @@ -88,8 +87,6 @@ Please refer to the [Changelog](https://github.com/rails/rails/blob/master/railt * Threadsafe on by default -* Add `Rails.queue` for processing jobs in the background. - ### Deprecations * `config.threadsafe!` is deprecated in favor of `config.eager_load` which provides a more fine grained control on what is eager loaded. @@ -103,8 +100,6 @@ Please refer to the [Changelog](https://github.com/rails/rails/blob/master/actio ### Notable changes -* Asynchronously send messages via the Rails Queue. ([Pull Request](https://github.com/rails/rails/pull/6839)) - ### Deprecations Active Model diff --git a/guides/source/action_mailer_basics.md b/guides/source/action_mailer_basics.md index 6bb3439e5e..795afd0150 100644 --- a/guides/source/action_mailer_basics.md +++ b/guides/source/action_mailer_basics.md @@ -575,26 +575,3 @@ end ``` In the test we send the email and store the returned object in the `email` variable. We then ensure that it was sent (the first assert), then, in the second batch of assertions, we ensure that the email does indeed contain what we expect. - -Asynchronous ------------- - -Rails provides a Synchronous Queue by default. If you want to use an Asynchronous one you will need to configure an async Queue provider like Resque. Queue providers are supposed to have a Railtie where they configure it's own async queue. - -### Custom Queues - -If you need a different queue than `Rails.queue` for your mailer you can use `ActionMailer::Base.queue=`: - -```ruby -class WelcomeMailer < ActionMailer::Base - self.queue = MyQueue.new -end -``` - -or adding to your `config/environments/$RAILS_ENV.rb`: - -```ruby -config.action_mailer.queue = MyQueue.new -``` - -Your custom queue should expect a job that responds to `#run`. diff --git a/guides/source/configuring.md b/guides/source/configuring.md index a8e33a2956..6dba76c7b2 100644 --- a/guides/source/configuring.md +++ b/guides/source/configuring.md @@ -109,10 +109,6 @@ These configuration methods are to be called on a `Rails::Railtie` object, such * `config.middleware` allows you to configure the application's middleware. This is covered in depth in the [Configuring Middleware](#configuring-middleware) section below. -* `config.queue` configures the default job queue for the application. Defaults to `ActiveSupport::Queue.new` which processes jobs in a background thread. If you change the queue, you're responsible for running the jobs as well. - -* `config.queue_consumer` configures a different job consumer for the default queue. Defaults to `ActiveSupport::ThreadedQueueConsumer`. The job consumer must respond to `start`. - * `config.reload_classes_only_on_change` enables or disables reloading of classes only when tracked files change. By default tracks everything on autoload paths and is set to true. If `config.cache_classes` is true, this option is ignored. * `config.secret_key_base` used for specifying a key which allows sessions for the application to be verified against a known secure key to prevent tampering. Applications get `config.secret_key_base` initialized to a random key in `config/initializers/secret_token.rb`. @@ -431,11 +427,6 @@ There are a number of settings available on `config.action_mailer`: config.action_mailer.interceptors = ["MailInterceptor"] ``` -* `config.action_mailer.queue` registers the queue that will be used to deliver the mail. -```ruby -config.action_mailer.queue = SomeQueue.new -``` - ### Configuring Active Support There are a few configuration options available in Active Support: -- cgit v1.2.3