inst-jobs 3.1.3 → 3.1.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/delayed/backend/active_record.rb +5 -1
- data/lib/delayed/backend/base.rb +7 -1
- data/lib/delayed/pool.rb +12 -2
- data/lib/delayed/server.rb +7 -1
- data/lib/delayed/version.rb +1 -1
- data/lib/delayed/work_queue/parent_process/server.rb +5 -1
- metadata +6 -6
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 2bea5022e36cc4d9748d96fd7abadcdf15e86704c0b79551ccabf32d093ad4fa
|
|
4
|
+
data.tar.gz: 262023f6a3892f685b31a97437913689b4b6c2f6017600a05e325030a3f6c620
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: d073c05f492b416d0fa0a3a16e9337635289afc53107239d1bbf1b41370f0baad837315f59f997be912db61f13fc1b320aefb8ec68c9ccafce8f3eeb2825d266
|
|
7
|
+
data.tar.gz: 7f2182ecdea50d3e547d2b4fa1d99a1bcaace68936ae49fd006c5d03f7b4e4e008bcd792c1b35b0157379182b24d1bac8cca34c5c2dc85637953212db140e33c
|
|
@@ -28,7 +28,11 @@ module Delayed
|
|
|
28
28
|
scope :next_in_strand_order, -> { order(:strand_order_override, :id) }
|
|
29
29
|
|
|
30
30
|
def self.reconnect!
|
|
31
|
-
|
|
31
|
+
if Rails.version < "6.1"
|
|
32
|
+
ActiveRecord::Base.connection_handler.clear_all_connections!
|
|
33
|
+
else
|
|
34
|
+
ActiveRecord::Base.connection_handler.clear_all_connections!(nil)
|
|
35
|
+
end
|
|
32
36
|
end
|
|
33
37
|
|
|
34
38
|
class << self
|
data/lib/delayed/backend/base.rb
CHANGED
|
@@ -312,7 +312,13 @@ module Delayed
|
|
|
312
312
|
payload_object.perform
|
|
313
313
|
ensure
|
|
314
314
|
Delayed::Job.in_delayed_job = false
|
|
315
|
-
|
|
315
|
+
unless Rails.env.test?
|
|
316
|
+
if Rails.version < "6.1"
|
|
317
|
+
::ActiveRecord::Base.clear_active_connections!
|
|
318
|
+
else
|
|
319
|
+
::ActiveRecord::Base.clear_active_connections!(nil)
|
|
320
|
+
end
|
|
321
|
+
end
|
|
316
322
|
end
|
|
317
323
|
end
|
|
318
324
|
end
|
data/lib/delayed/pool.rb
CHANGED
|
@@ -67,11 +67,21 @@ module Delayed
|
|
|
67
67
|
|
|
68
68
|
unlocked_jobs = Delayed::Job.unlock_orphaned_jobs(pid)
|
|
69
69
|
say "Unlocked #{unlocked_jobs} orphaned jobs" if unlocked_jobs.positive?
|
|
70
|
-
|
|
70
|
+
return if Rails.env.test?
|
|
71
|
+
|
|
72
|
+
if Rails.version < "6.1"
|
|
73
|
+
ActiveRecord::Base.connection_handler.clear_all_connections!
|
|
74
|
+
else
|
|
75
|
+
ActiveRecord::Base.connection_handler.clear_all_connections!(nil)
|
|
76
|
+
end
|
|
71
77
|
end
|
|
72
78
|
|
|
73
79
|
def spawn_all_workers
|
|
74
|
-
|
|
80
|
+
if Rails.version < "6.1"
|
|
81
|
+
ActiveRecord::Base.connection_handler.clear_all_connections!
|
|
82
|
+
else
|
|
83
|
+
ActiveRecord::Base.connection_handler.clear_all_connections!(nil)
|
|
84
|
+
end
|
|
75
85
|
|
|
76
86
|
if @config[:work_queue] == "parent_process"
|
|
77
87
|
@work_queue = WorkQueue::ParentProcess.new
|
data/lib/delayed/server.rb
CHANGED
|
@@ -37,7 +37,13 @@ module Delayed
|
|
|
37
37
|
|
|
38
38
|
# Release any used connections back to the pool
|
|
39
39
|
after do
|
|
40
|
-
|
|
40
|
+
if using_active_record?
|
|
41
|
+
if Rails.version < "6.1"
|
|
42
|
+
::ActiveRecord::Base.clear_active_connections!
|
|
43
|
+
else
|
|
44
|
+
::ActiveRecord::Base.clear_active_connections!(nil)
|
|
45
|
+
end
|
|
46
|
+
end
|
|
41
47
|
end
|
|
42
48
|
|
|
43
49
|
configure :development do
|
data/lib/delayed/version.rb
CHANGED
|
@@ -226,7 +226,11 @@ module Delayed
|
|
|
226
226
|
|
|
227
227
|
# otherwise just reconnect and let it retry
|
|
228
228
|
logger.warn("failed to unlock prefetched jobs - connection terminated; skipping for now")
|
|
229
|
-
|
|
229
|
+
if Rails.version < "6.1"
|
|
230
|
+
Delayed::Job.clear_all_connections!
|
|
231
|
+
else
|
|
232
|
+
Delayed::Job.clear_all_connections!(nil)
|
|
233
|
+
end
|
|
230
234
|
end
|
|
231
235
|
end
|
|
232
236
|
|
metadata
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: inst-jobs
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 3.1.
|
|
4
|
+
version: 3.1.4
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Cody Cutrer
|
|
8
8
|
- Ethan Vizitei
|
|
9
9
|
- Jacob Burroughs
|
|
10
|
-
autorequire:
|
|
10
|
+
autorequire:
|
|
11
11
|
bindir: exe
|
|
12
12
|
cert_chain: []
|
|
13
|
-
date: 2022-
|
|
13
|
+
date: 2022-07-01 00:00:00.000000000 Z
|
|
14
14
|
dependencies:
|
|
15
15
|
- !ruby/object:Gem::Dependency
|
|
16
16
|
name: activerecord
|
|
@@ -410,7 +410,7 @@ dependencies:
|
|
|
410
410
|
- - ">="
|
|
411
411
|
- !ruby/object:Gem::Version
|
|
412
412
|
version: '0'
|
|
413
|
-
description:
|
|
413
|
+
description:
|
|
414
414
|
email:
|
|
415
415
|
- cody@instructure.com
|
|
416
416
|
- evizitei@instructure.com
|
|
@@ -504,7 +504,7 @@ homepage: https://github.com/instructure/inst-jobs
|
|
|
504
504
|
licenses: []
|
|
505
505
|
metadata:
|
|
506
506
|
rubygems_mfa_required: 'true'
|
|
507
|
-
post_install_message:
|
|
507
|
+
post_install_message:
|
|
508
508
|
rdoc_options: []
|
|
509
509
|
require_paths:
|
|
510
510
|
- lib
|
|
@@ -520,7 +520,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
520
520
|
version: '0'
|
|
521
521
|
requirements: []
|
|
522
522
|
rubygems_version: 3.1.6
|
|
523
|
-
signing_key:
|
|
523
|
+
signing_key:
|
|
524
524
|
specification_version: 4
|
|
525
525
|
summary: Instructure-maintained fork of delayed_job
|
|
526
526
|
test_files: []
|