activejob 5.0.7.2 → 5.1.0.beta1
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 +5 -5
- data/CHANGELOG.md +24 -221
- data/MIT-LICENSE +1 -1
- data/README.md +1 -1
- data/lib/active_job.rb +5 -5
- data/lib/active_job/arguments.rb +7 -19
- data/lib/active_job/base.rb +11 -9
- data/lib/active_job/callbacks.rb +3 -3
- data/lib/active_job/configured_job.rb +1 -1
- data/lib/active_job/core.rb +14 -9
- data/lib/active_job/enqueuing.rb +7 -32
- data/lib/active_job/exceptions.rb +122 -0
- data/lib/active_job/execution.rb +5 -2
- data/lib/active_job/gem_version.rb +3 -3
- data/lib/active_job/logging.rb +56 -56
- data/lib/active_job/queue_adapter.rb +14 -26
- data/lib/active_job/queue_adapters.rb +2 -2
- data/lib/active_job/queue_adapters/async_adapter.rb +4 -4
- data/lib/active_job/queue_adapters/backburner_adapter.rb +1 -1
- data/lib/active_job/queue_adapters/delayed_job_adapter.rb +1 -1
- data/lib/active_job/queue_adapters/qu_adapter.rb +3 -3
- data/lib/active_job/queue_adapters/que_adapter.rb +1 -1
- data/lib/active_job/queue_adapters/queue_classic_adapter.rb +4 -4
- data/lib/active_job/queue_adapters/resque_adapter.rb +5 -5
- data/lib/active_job/queue_adapters/sidekiq_adapter.rb +11 -11
- data/lib/active_job/queue_adapters/sneakers_adapter.rb +3 -3
- data/lib/active_job/queue_adapters/sucker_punch_adapter.rb +3 -3
- data/lib/active_job/queue_adapters/test_adapter.rb +13 -17
- data/lib/active_job/queue_name.rb +2 -3
- data/lib/active_job/queue_priority.rb +1 -2
- data/lib/active_job/railtie.rb +4 -4
- data/lib/active_job/test_case.rb +1 -1
- data/lib/active_job/test_helper.rb +78 -39
- data/lib/active_job/version.rb +1 -1
- data/lib/rails/generators/job/job_generator.rb +12 -12
- data/lib/rails/generators/job/templates/application_job.rb +5 -0
- metadata +9 -7
data/lib/active_job/version.rb
CHANGED
@@ -1,13 +1,13 @@
|
|
1
|
-
require
|
1
|
+
require "rails/generators/named_base"
|
2
2
|
|
3
3
|
module Rails # :nodoc:
|
4
4
|
module Generators # :nodoc:
|
5
5
|
class JobGenerator < Rails::Generators::NamedBase # :nodoc:
|
6
|
-
desc
|
6
|
+
desc "This generator creates an active job file at app/jobs"
|
7
7
|
|
8
|
-
class_option :queue, type: :string, default:
|
8
|
+
class_option :queue, type: :string, default: "default", desc: "The queue name for the generated job"
|
9
9
|
|
10
|
-
check_class_collision suffix:
|
10
|
+
check_class_collision suffix: "Job"
|
11
11
|
|
12
12
|
hook_for :test_framework
|
13
13
|
|
@@ -16,22 +16,22 @@ module Rails # :nodoc:
|
|
16
16
|
end
|
17
17
|
|
18
18
|
def create_job_file
|
19
|
-
template
|
19
|
+
template "job.rb", File.join("app/jobs", class_path, "#{file_name}_job.rb")
|
20
20
|
|
21
21
|
in_root do
|
22
|
-
if
|
23
|
-
template
|
22
|
+
if behavior == :invoke && !File.exist?(application_job_file_name)
|
23
|
+
template "application_job.rb", application_job_file_name
|
24
24
|
end
|
25
25
|
end
|
26
26
|
end
|
27
27
|
|
28
28
|
private
|
29
29
|
def application_job_file_name
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
30
|
+
@application_job_file_name ||= if mountable_engine?
|
31
|
+
"app/jobs/#{namespaced_path}/application_job.rb"
|
32
|
+
else
|
33
|
+
"app/jobs/application_job.rb"
|
34
|
+
end
|
35
35
|
end
|
36
36
|
end
|
37
37
|
end
|
@@ -1,4 +1,9 @@
|
|
1
1
|
<% module_namespacing do -%>
|
2
2
|
class ApplicationJob < ActiveJob::Base
|
3
|
+
# Automatically retry jobs that encountered a deadlock
|
4
|
+
# retry_on ActiveRecord::Deadlocked
|
5
|
+
|
6
|
+
# Most jobs are safe to ignore if the underlying records are no longer available
|
7
|
+
# discard_on ActiveJob::DeserializationError
|
3
8
|
end
|
4
9
|
<% 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.
|
4
|
+
version: 5.1.0.beta1
|
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:
|
11
|
+
date: 2017-02-23 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.
|
19
|
+
version: 5.1.0.beta1
|
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.
|
26
|
+
version: 5.1.0.beta1
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: globalid
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
@@ -54,6 +54,7 @@ files:
|
|
54
54
|
- lib/active_job/configured_job.rb
|
55
55
|
- lib/active_job/core.rb
|
56
56
|
- lib/active_job/enqueuing.rb
|
57
|
+
- lib/active_job/exceptions.rb
|
57
58
|
- lib/active_job/execution.rb
|
58
59
|
- lib/active_job/gem_version.rb
|
59
60
|
- lib/active_job/logging.rb
|
@@ -96,11 +97,12 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
96
97
|
version: 2.2.2
|
97
98
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
98
99
|
requirements:
|
99
|
-
- - "
|
100
|
+
- - ">"
|
100
101
|
- !ruby/object:Gem::Version
|
101
|
-
version:
|
102
|
+
version: 1.3.1
|
102
103
|
requirements: []
|
103
|
-
|
104
|
+
rubyforge_project:
|
105
|
+
rubygems_version: 2.6.10
|
104
106
|
signing_key:
|
105
107
|
specification_version: 4
|
106
108
|
summary: Job framework with pluggable queues.
|