good_job 1.99.1 → 1.99.2
Sign up to get free protection for your applications and to get access to all the features.
@@ -4,6 +4,10 @@ class AddActiveJobIdIndexAndConcurrencyKeyIndexToGoodJobs < ActiveRecord::Migrat
|
|
4
4
|
|
5
5
|
UPDATE_BATCH_SIZE = 1_000
|
6
6
|
|
7
|
+
class GoodJobJobs < ActiveRecord::Base
|
8
|
+
self.table_name = "good_jobs"
|
9
|
+
end
|
10
|
+
|
7
11
|
def change
|
8
12
|
reversible do |dir|
|
9
13
|
dir.up do
|
@@ -24,7 +28,7 @@ class AddActiveJobIdIndexAndConcurrencyKeyIndexToGoodJobs < ActiveRecord::Migrat
|
|
24
28
|
# Ensure that all `good_jobs` records have an active_job_id value
|
25
29
|
start_time = Time.current
|
26
30
|
loop do
|
27
|
-
break if
|
31
|
+
break if GoodJobJobs.where(active_job_id: nil, finished_at: nil).where("created_at < ?", start_time).limit(UPDATE_BATCH_SIZE).update_all("active_job_id = (serialized_params->>'job_id')::uuid").zero?
|
28
32
|
end
|
29
33
|
end
|
30
34
|
end
|
data/lib/good_job/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: good_job
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.99.
|
4
|
+
version: 1.99.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ben Sheldon
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2024-07-18 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activejob
|
@@ -428,7 +428,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
428
428
|
- !ruby/object:Gem::Version
|
429
429
|
version: '0'
|
430
430
|
requirements: []
|
431
|
-
rubygems_version: 3.
|
431
|
+
rubygems_version: 3.1.6
|
432
432
|
signing_key:
|
433
433
|
specification_version: 4
|
434
434
|
summary: A multithreaded, Postgres-based ActiveJob backend for Ruby on Rails
|