delayed_job 4.1.10 → 4.1.12.rc1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +11 -0
- data/README.md +1 -1
- data/delayed_job.gemspec +1 -1
- data/lib/delayed/backend/job_preparer.rb +2 -0
- data/lib/delayed/backend/shared_spec.rb +7 -2
- data/lib/delayed/compatibility.rb +0 -12
- data/lib/delayed/message_sending.rb +11 -1
- data/lib/delayed/worker.rb +1 -0
- data/spec/worker_spec.rb +1 -1
- metadata +13 -13
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9dee84dbf047fe22f576427977f85e2e6067b2da32ae6a059c48e00af4edd7ee
|
4
|
+
data.tar.gz: 89aa277c92ddc9607d1ac80943f425abdca976b7d6c95bc6cb26eaefd13660a1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a5312b8235dd4d4a0df101273510bf8ab8c861eb1ae262f2f8b922231ad74801f1d965ef42eb9618eb334c7921d9418384210cc6ddd572ee3955848c94194b79
|
7
|
+
data.tar.gz: 3645cd72500161cad619bea05c873bdbf96f38b412579541e3a024ccceba3e18729565067613d447e601c8c01cc8289d9a315158851d1629f6cf4477a4d14450
|
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,14 @@
|
|
1
|
+
4.1.12.rc1 - 2024-08-13
|
2
|
+
=======================
|
3
|
+
* Validating trusted publishing release
|
4
|
+
* Add missing require for extract_options
|
5
|
+
* Fix rails 7.2 ActiveSupport::ProxyObject deprecation
|
6
|
+
* Multiple contributors on current and legacy test suite improvements
|
7
|
+
|
8
|
+
4.1.11 - 2022-09-28
|
9
|
+
===================
|
10
|
+
* Fix missing require for Rails 7.0.3+
|
11
|
+
|
1
12
|
4.1.10 - 2022-01-17
|
2
13
|
===================
|
3
14
|
* Support for Rails 7.0. NOTE: If you are using Delayed Job independent of Rails, Active Support 7 has dropped classic dependency autoloading. You will need to add and setup zeitwerk for autoloading to continue working in ActiveSupport 7.
|
data/README.md
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
**If you're viewing this at https://github.com/collectiveidea/delayed_job,
|
2
2
|
you're reading the documentation for the master branch.
|
3
3
|
[View documentation for the latest release
|
4
|
-
(4.1.
|
4
|
+
(4.1.12.rc1).](https://github.com/collectiveidea/delayed_job/tree/v4.1.12.rc1)**
|
5
5
|
|
6
6
|
Delayed::Job
|
7
7
|
============
|
data/delayed_job.gemspec
CHANGED
@@ -13,7 +13,7 @@ Gem::Specification.new do |spec|
|
|
13
13
|
spec.require_paths = ['lib']
|
14
14
|
spec.summary = 'Database-backed asynchronous priority queue system -- Extracted from Shopify'
|
15
15
|
spec.test_files = Dir.glob('spec/**/*')
|
16
|
-
spec.version = '4.1.
|
16
|
+
spec.version = '4.1.12.rc1'
|
17
17
|
spec.metadata = {
|
18
18
|
'changelog_uri' => 'https://github.com/collectiveidea/delayed_job/blob/master/CHANGELOG.md',
|
19
19
|
'bug_tracker_uri' => 'https://github.com/collectiveidea/delayed_job/issues',
|
@@ -230,7 +230,7 @@ shared_examples_for 'a delayed_job backend' do
|
|
230
230
|
end
|
231
231
|
|
232
232
|
it 'reserves jobs scheduled for the past when time zones are involved' do
|
233
|
-
Time.zone = '
|
233
|
+
Time.zone = 'America/New_York'
|
234
234
|
job = create_job :run_at => described_class.db_time_now - 1.minute
|
235
235
|
expect(described_class.reserve(worker)).to eq(job)
|
236
236
|
end
|
@@ -595,7 +595,12 @@ shared_examples_for 'a delayed_job backend' do
|
|
595
595
|
worker.work_off
|
596
596
|
@job.reload
|
597
597
|
expect(@job.last_error).to match(/did not work/)
|
598
|
-
|
598
|
+
if Gem::Version.new(RUBY_VERSION) >= Gem::Version.new('3.4.0')
|
599
|
+
# Ruby 3.4 produces a more verbose message
|
600
|
+
expect(@job.last_error).to match(/sample_jobs.rb:\d+:in 'ErrorJob#perform'/)
|
601
|
+
else
|
602
|
+
expect(@job.last_error).to match(/sample_jobs.rb:\d+:in `perform'/)
|
603
|
+
end
|
599
604
|
expect(@job.attempts).to eq(1)
|
600
605
|
expect(@job.run_at).to be > Delayed::Job.db_time_now - 10.minutes
|
601
606
|
expect(@job.run_at).to be < Delayed::Job.db_time_now + 10.minutes
|
@@ -3,25 +3,13 @@ require 'active_support/version'
|
|
3
3
|
module Delayed
|
4
4
|
module Compatibility
|
5
5
|
if ActiveSupport::VERSION::MAJOR >= 4
|
6
|
-
require 'active_support/proxy_object'
|
7
|
-
|
8
6
|
def self.executable_prefix
|
9
7
|
'bin'
|
10
8
|
end
|
11
|
-
|
12
|
-
def self.proxy_object_class
|
13
|
-
ActiveSupport::ProxyObject
|
14
|
-
end
|
15
9
|
else
|
16
|
-
require 'active_support/basic_object'
|
17
|
-
|
18
10
|
def self.executable_prefix
|
19
11
|
'script'
|
20
12
|
end
|
21
|
-
|
22
|
-
def self.proxy_object_class
|
23
|
-
ActiveSupport::BasicObject
|
24
|
-
end
|
25
13
|
end
|
26
14
|
end
|
27
15
|
end
|
@@ -1,5 +1,15 @@
|
|
1
1
|
module Delayed
|
2
|
-
class DelayProxy <
|
2
|
+
class DelayProxy < BasicObject
|
3
|
+
# What additional methods exist on BasicObject has changed over time
|
4
|
+
(::BasicObject.instance_methods - [:__id__, :__send__, :instance_eval, :instance_exec]).each do |method|
|
5
|
+
undef_method method
|
6
|
+
end
|
7
|
+
|
8
|
+
# Let DelayProxy raise exceptions.
|
9
|
+
def raise(*args)
|
10
|
+
::Object.send(:raise, *args)
|
11
|
+
end
|
12
|
+
|
3
13
|
def initialize(payload_class, target, options)
|
4
14
|
@payload_class = payload_class
|
5
15
|
@target = target
|
data/lib/delayed/worker.rb
CHANGED
@@ -1,5 +1,6 @@
|
|
1
1
|
require 'timeout'
|
2
2
|
require 'active_support/dependencies'
|
3
|
+
require 'active_support/core_ext/kernel/reporting'
|
3
4
|
require 'active_support/core_ext/numeric/time'
|
4
5
|
require 'active_support/core_ext/class/attribute_accessors'
|
5
6
|
require 'active_support/hash_with_indifferent_access'
|
data/spec/worker_spec.rb
CHANGED
@@ -106,7 +106,7 @@ describe Delayed::Worker do
|
|
106
106
|
expect(Delayed::Job).to receive(:reserve).exactly(10).times.and_raise(Exception)
|
107
107
|
worker = Delayed::Worker.new
|
108
108
|
9.times { worker.work_off }
|
109
|
-
expect
|
109
|
+
expect { worker.work_off }.to raise_exception Delayed::FatalBackendError
|
110
110
|
end
|
111
111
|
|
112
112
|
it 'allows the backend to attempt recovery from reservation errors' do
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: delayed_job
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 4.1.
|
4
|
+
version: 4.1.12.rc1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Brandon Keepers
|
@@ -15,7 +15,7 @@ authors:
|
|
15
15
|
autorequire:
|
16
16
|
bindir: bin
|
17
17
|
cert_chain: []
|
18
|
-
date:
|
18
|
+
date: 2024-08-13 00:00:00.000000000 Z
|
19
19
|
dependencies:
|
20
20
|
- !ruby/object:Gem::Dependency
|
21
21
|
name: activesupport
|
@@ -121,26 +121,26 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
121
121
|
- !ruby/object:Gem::Version
|
122
122
|
version: '0'
|
123
123
|
requirements: []
|
124
|
-
rubygems_version: 3.
|
124
|
+
rubygems_version: 3.5.11
|
125
125
|
signing_key:
|
126
126
|
specification_version: 4
|
127
127
|
summary: Database-backed asynchronous priority queue system -- Extracted from Shopify
|
128
128
|
test_files:
|
129
|
-
- spec/sample_jobs.rb
|
130
|
-
- spec/lifecycle_spec.rb
|
131
|
-
- spec/performable_method_spec.rb
|
132
|
-
- spec/helper.rb
|
133
|
-
- spec/psych_ext_spec.rb
|
134
|
-
- spec/worker_spec.rb
|
135
|
-
- spec/autoloaded/struct.rb
|
136
129
|
- spec/autoloaded/clazz.rb
|
137
130
|
- spec/autoloaded/instance_clazz.rb
|
138
131
|
- spec/autoloaded/instance_struct.rb
|
139
|
-
- spec/
|
140
|
-
- spec/
|
132
|
+
- spec/autoloaded/struct.rb
|
133
|
+
- spec/daemons.rb
|
141
134
|
- spec/delayed/backend/test.rb
|
142
135
|
- spec/delayed/command_spec.rb
|
136
|
+
- spec/delayed/serialization/test.rb
|
137
|
+
- spec/helper.rb
|
138
|
+
- spec/lifecycle_spec.rb
|
143
139
|
- spec/message_sending_spec.rb
|
144
140
|
- spec/performable_mailer_spec.rb
|
141
|
+
- spec/performable_method_spec.rb
|
142
|
+
- spec/psych_ext_spec.rb
|
143
|
+
- spec/sample_jobs.rb
|
144
|
+
- spec/test_backend_spec.rb
|
145
|
+
- spec/worker_spec.rb
|
145
146
|
- spec/yaml_ext_spec.rb
|
146
|
-
- spec/daemons.rb
|