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 +4 -4
- data/CHANGELOG.md +9 -0
- data/README.md +1 -6
- data/lib/active_job/async_job.rb +1 -1
- data/lib/active_job/gem_version.rb +1 -1
- data/lib/active_job/queue_adapter.rb +4 -4
- data/lib/active_job/queue_adapters/async_adapter.rb +1 -1
- data/lib/active_job/queue_adapters/inline_adapter.rb +1 -1
- data/lib/active_job/railtie.rb +1 -1
- data/lib/active_job/test_helper.rb +1 -1
- metadata +5 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 526b7c0ad7e2e92215cbb0bf362ef9113e248cd2
|
4
|
+
data.tar.gz: 3f66e41cd86278974127b13e08a28b81a9c68c0e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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
|
-
|
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
|
|
data/lib/active_job/async_job.rb
CHANGED
@@ -6,7 +6,7 @@ require 'concurrent/utility/processor_counter'
|
|
6
6
|
module ActiveJob
|
7
7
|
# == Active Job Async Job
|
8
8
|
#
|
9
|
-
# When
|
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
|
@@ -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 +:
|
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 = :
|
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 +:
|
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 +:
|
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
|
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
|
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+.
|
data/lib/active_job/railtie.rb
CHANGED
@@ -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 ||= :
|
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
|
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.
|
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-
|
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.
|
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.
|
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.
|
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:
|