rocketjob 6.3.1 → 6.3.2
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/rocket_job/jobs/upload_file_job.rb +1 -1
- data/lib/rocket_job/version.rb +1 -1
- data/lib/rocket_job/worker.rb +17 -3
- metadata +3 -3
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: d48a3c90185bfb29f8d18060f54cd0f707eec8679d3ece753600034d93d7e16a
|
|
4
|
+
data.tar.gz: 1fb550f51f4a1c2790bd0728bf06baea2b6750f42e118b9fe498255341d9baaa
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 7f89a635e43ee05ae8d980b8db70052c7783477e6451cc37d71be4952ef00711dbc15a550e75947d8197b12108ea8122a216bff0ca7bb3e141f4b9a1ee0a2598
|
|
7
|
+
data.tar.gz: b51fa5e89696defe6326c85c32e00661b68b6146ed02f2222656fddfef2317468d303f36914649389fff477597bfda8747f09d8a22881d870603c9acef8e3d90
|
|
@@ -62,7 +62,7 @@ module RocketJob
|
|
|
62
62
|
if defined?(ActiveRecord::Base)
|
|
63
63
|
if ActiveRecord::Base.respond_to?(:connection_handler)
|
|
64
64
|
# Rails 7
|
|
65
|
-
ActiveRecord::Base.connection_handler.clear_active_connections!
|
|
65
|
+
ActiveRecord::Base.connection_handler.clear_active_connections!(:all)
|
|
66
66
|
else
|
|
67
67
|
ActiveRecord::Base.connection_pool.release_connection
|
|
68
68
|
end
|
data/lib/rocket_job/version.rb
CHANGED
data/lib/rocket_job/worker.rb
CHANGED
|
@@ -69,8 +69,16 @@ module RocketJob
|
|
|
69
69
|
|
|
70
70
|
# Returns true when work was completed, but no other work is available
|
|
71
71
|
if job&.rocket_job_work(self, false)
|
|
72
|
-
# Return the database connections for this
|
|
73
|
-
|
|
72
|
+
# Return the database connections for this fiber back to the connection pool
|
|
73
|
+
if defined?(ActiveRecord::Base)
|
|
74
|
+
if ActiveRecord::Base.respond_to?(:connection_handler)
|
|
75
|
+
# Rails 7 .2
|
|
76
|
+
ActiveRecord::Base.connection_handler.clear_active_connections!(:all)
|
|
77
|
+
else
|
|
78
|
+
ActiveRecord::Base.clear_active_connections!
|
|
79
|
+
end
|
|
80
|
+
end
|
|
81
|
+
|
|
74
82
|
|
|
75
83
|
# Stagger workers so that they don't all poll at the same time.
|
|
76
84
|
sleep_seconds = random_wait_interval
|
|
@@ -83,7 +91,13 @@ module RocketJob
|
|
|
83
91
|
rescue Exception => e
|
|
84
92
|
logger.fatal("Unhandled exception in job processing thread", e)
|
|
85
93
|
ensure
|
|
86
|
-
|
|
94
|
+
if defined?(ActiveRecord::Base)
|
|
95
|
+
if ActiveRecord::Base.respond_to?(:connection_handler)
|
|
96
|
+
ActiveRecord::Base.connection_handler.clear_active_connections!(:all)
|
|
97
|
+
else
|
|
98
|
+
ActiveRecord::Base.clear_active_connections!
|
|
99
|
+
end
|
|
100
|
+
end
|
|
87
101
|
end
|
|
88
102
|
|
|
89
103
|
# Resets the current job filter if the relevant time interval has passed
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: rocketjob
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 6.3.
|
|
4
|
+
version: 6.3.2
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Reid Morrison
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date:
|
|
11
|
+
date: 2026-01-31 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: aasm
|
|
@@ -236,7 +236,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
236
236
|
- !ruby/object:Gem::Version
|
|
237
237
|
version: '0'
|
|
238
238
|
requirements: []
|
|
239
|
-
rubygems_version: 3.
|
|
239
|
+
rubygems_version: 3.5.3
|
|
240
240
|
signing_key:
|
|
241
241
|
specification_version: 4
|
|
242
242
|
summary: Ruby's missing batch processing system.
|