activejob 5.0.0.beta2 → 5.0.0.beta3

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of activejob might be problematic. Click here for more details.

checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: dfa4cd8e13389288d3ab4fe31be121dbc91e7611
4
- data.tar.gz: ebb8b8ff8363f658033da88a8081d9d1541e1f7d
3
+ metadata.gz: 526b7c0ad7e2e92215cbb0bf362ef9113e248cd2
4
+ data.tar.gz: 3f66e41cd86278974127b13e08a28b81a9c68c0e
5
5
  SHA512:
6
- metadata.gz: c91edb9706c7df5606a61d015ea37efdd1c139798273055e63677716239115dc2da669a5055a3c8df7c0ba92363cd8df7bd29311c99bcd5a09f5856c36016c1e
7
- data.tar.gz: c96357020e128cc7b7dd295bf6cfc75acf68a2da1806af609dea097ec8ff5e51b0f1663516be2bc5a587f07adc9b3e7c6258911d4ae868740a8e1e3343f6320c
6
+ metadata.gz: eb8349f3129814464cfe53b3c9ec2f4d9a1a900482ca510093ba66b23ee8f8246356772070e0f6baf62a9afc297fb8f6b5cc03284ad81c6946782187243cf05e
7
+ data.tar.gz: 01908295426a77f5dfedad73c7e10afe59c5066eb8687800c28e5f4411bc93206cbbcf3ca8dd6db34ee7def299c56e04f46dae88c8724cdae47eb83b82b610b0
data/CHANGELOG.md CHANGED
@@ -1,3 +1,12 @@
1
+ ## Rails 5.0.0.beta3 (February 24, 2016) ##
2
+
3
+ * Change the default adapter from inline to async. It's a better default as tests will then not mistakenly
4
+ come to rely on behavior happening synchronously. This is especially important with things like jobs kicked off
5
+ in Active Record lifecycle callbacks.
6
+
7
+ *DHH*
8
+
9
+
1
10
  ## Rails 5.0.0.beta2 (February 01, 2016) ##
2
11
 
3
12
  * No changes.
data/README.md CHANGED
@@ -20,12 +20,7 @@ switch between them without having to rewrite your jobs.
20
20
 
21
21
  ## Usage
22
22
 
23
- Set the queue adapter for Active Job:
24
-
25
- ``` ruby
26
- ActiveJob::Base.queue_adapter = :inline # default queue adapter
27
- ```
28
- Note: To learn how to use your preferred queueing backend see its adapter
23
+ To learn how to use your preferred queueing backend see its adapter
29
24
  documentation at
30
25
  [ActiveJob::QueueAdapters](http://api.rubyonrails.org/classes/ActiveJob/QueueAdapters.html).
31
26
 
@@ -6,7 +6,7 @@ require 'concurrent/utility/processor_counter'
6
6
  module ActiveJob
7
7
  # == Active Job Async Job
8
8
  #
9
- # When enqueueing jobs with Async Job each job will be executed asynchronously
9
+ # When enqueuing jobs with Async Job each job will be executed asynchronously
10
10
  # on a +concurrent-ruby+ thread pool. All job data is retained in memory.
11
11
  # Because job data is not saved to a persistent datastore there is no
12
12
  # additional infrastructure needed and jobs process quickly. The lack of
@@ -8,7 +8,7 @@ module ActiveJob
8
8
  MAJOR = 5
9
9
  MINOR = 0
10
10
  TINY = 0
11
- PRE = "beta2"
11
+ PRE = "beta3"
12
12
 
13
13
  STRING = [MAJOR, MINOR, TINY, PRE].compact.join(".")
14
14
  end
@@ -4,25 +4,25 @@ require 'active_support/core_ext/string/inflections'
4
4
 
5
5
  module ActiveJob
6
6
  # The <tt>ActiveJob::QueueAdapter</tt> module is used to load the
7
- # correct adapter. The default queue adapter is the +:inline+ queue.
7
+ # correct adapter. The default queue adapter is the +:async+ queue.
8
8
  module QueueAdapter #:nodoc:
9
9
  extend ActiveSupport::Concern
10
10
 
11
11
  included do
12
12
  class_attribute :_queue_adapter, instance_accessor: false, instance_predicate: false
13
- self.queue_adapter = :inline
13
+ self.queue_adapter = :async
14
14
  end
15
15
 
16
16
  # Includes the setter method for changing the active queue adapter.
17
17
  module ClassMethods
18
18
  # Returns the backend queue provider. The default queue adapter
19
- # is the +:inline+ queue. See QueueAdapters for more information.
19
+ # is the +:async+ queue. See QueueAdapters for more information.
20
20
  def queue_adapter
21
21
  _queue_adapter
22
22
  end
23
23
 
24
24
  # Specify the backend queue provider. The default queue adapter
25
- # is the +:inline+ queue. See QueueAdapters for more
25
+ # is the +:async+ queue. See QueueAdapters for more
26
26
  # information.
27
27
  def queue_adapter=(name_or_adapter_or_class)
28
28
  self._queue_adapter = interpret_adapter(name_or_adapter_or_class)
@@ -4,7 +4,7 @@ module ActiveJob
4
4
  module QueueAdapters
5
5
  # == Active Job Async adapter
6
6
  #
7
- # When enqueueing jobs with the Async adapter the job will be executed
7
+ # When enqueuing jobs with the Async adapter the job will be executed
8
8
  # asynchronously using {AsyncJob}[http://api.rubyonrails.org/classes/ActiveJob/AsyncJob.html].
9
9
  #
10
10
  # To use +AsyncJob+ set the queue_adapter config to +:async+.
@@ -2,7 +2,7 @@ module ActiveJob
2
2
  module QueueAdapters
3
3
  # == Active Job Inline adapter
4
4
  #
5
- # When enqueueing jobs with the Inline adapter the job will be executed
5
+ # When enqueuing jobs with the Inline adapter the job will be executed
6
6
  # immediately.
7
7
  #
8
8
  # To use the Inline set the queue_adapter config to +:inline+.
@@ -12,7 +12,7 @@ module ActiveJob
12
12
 
13
13
  initializer "active_job.set_configs" do |app|
14
14
  options = app.config.active_job
15
- options.queue_adapter ||= :inline
15
+ options.queue_adapter ||= :async
16
16
 
17
17
  ActiveSupport.on_load(:active_job) do
18
18
  options.each { |k,v| send("#{k}=", v) }
@@ -58,7 +58,7 @@ module ActiveJob
58
58
  # The number of times a specific job is enqueued can be asserted.
59
59
  #
60
60
  # def test_logging_job
61
- # assert_enqueued_jobs 2, only: LoggingJob do
61
+ # assert_enqueued_jobs 1, only: LoggingJob do
62
62
  # LoggingJob.perform_later
63
63
  # HelloJob.perform_later('jeremy')
64
64
  # end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: activejob
3
3
  version: !ruby/object:Gem::Version
4
- version: 5.0.0.beta2
4
+ version: 5.0.0.beta3
5
5
  platform: ruby
6
6
  authors:
7
7
  - David Heinemeier Hansson
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-02-01 00:00:00.000000000 Z
11
+ date: 2016-02-24 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport
@@ -16,14 +16,14 @@ dependencies:
16
16
  requirements:
17
17
  - - '='
18
18
  - !ruby/object:Gem::Version
19
- version: 5.0.0.beta2
19
+ version: 5.0.0.beta3
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - '='
25
25
  - !ruby/object:Gem::Version
26
- version: 5.0.0.beta2
26
+ version: 5.0.0.beta3
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: globalid
29
29
  requirement: !ruby/object:Gem::Requirement
@@ -101,9 +101,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
101
101
  version: 1.3.1
102
102
  requirements: []
103
103
  rubyforge_project:
104
- rubygems_version: 2.5.2
104
+ rubygems_version: 2.5.1
105
105
  signing_key:
106
106
  specification_version: 4
107
107
  summary: Job framework with pluggable queues.
108
108
  test_files: []
109
- has_rdoc: