good_job 3.21.3 → 3.21.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +17 -0
- data/app/models/good_job/base_execution.rb +7 -0
- data/lib/generators/good_job/templates/update/migrations/07_recreate_good_job_cron_indexes_with_conditional.rb.erb +2 -2
- data/lib/good_job/systemd_service.rb +2 -2
- data/lib/good_job/version.rb +1 -1
- data/lib/good_job.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: fa13b9d970c63760bc8264906c0aeccf1f71f0b6e678338cca21778956fdba0a
|
4
|
+
data.tar.gz: cd4d0e5be595b266396a2ffa0d9da0955940f1afe7639a2456b9a8f67e9d205b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: '0871dcec35bfe62dbc59f07e81aa048cd04300316e859080a7f61f1666e61a1641a52ce76e6d827d2bf6e7524dd3893cacda66d94fb7ec994d88ae2e7b616ead'
|
7
|
+
data.tar.gz: 7171bf22d85558b2f48bbecc80fbe5a57cea331be996b6324e266bc1e8a1da9a3a13f9ab191d5dac167797be5e2b64c0a7bb9ebb05e4937b2946de9bafc17193
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,22 @@
|
|
1
1
|
# Changelog
|
2
2
|
|
3
|
+
## [v3.21.5](https://github.com/bensheldon/good_job/tree/v3.21.5) (2023-12-12)
|
4
|
+
|
5
|
+
[Full Changelog](https://github.com/bensheldon/good_job/compare/v3.21.4...v3.21.5)
|
6
|
+
|
7
|
+
**Fixed bugs:**
|
8
|
+
|
9
|
+
- Fix conditional index migration to be rollbackable [\#1176](https://github.com/bensheldon/good_job/pull/1176) ([bensheldon](https://github.com/bensheldon))
|
10
|
+
|
11
|
+
## [v3.21.4](https://github.com/bensheldon/good_job/tree/v3.21.4) (2023-12-11)
|
12
|
+
|
13
|
+
[Full Changelog](https://github.com/bensheldon/good_job/compare/v3.21.3...v3.21.4)
|
14
|
+
|
15
|
+
**Fixed bugs:**
|
16
|
+
|
17
|
+
- Fix latest migration not affecting `GoodJob.migrated?` [\#1175](https://github.com/bensheldon/good_job/pull/1175) ([Earlopain](https://github.com/Earlopain))
|
18
|
+
- Fix no method error in systemd service [\#1173](https://github.com/bensheldon/good_job/pull/1173) ([tagrudev](https://github.com/tagrudev))
|
19
|
+
|
3
20
|
## [v3.21.3](https://github.com/bensheldon/good_job/tree/v3.21.3) (2023-12-10)
|
4
21
|
|
5
22
|
[Full Changelog](https://github.com/bensheldon/good_job/compare/v3.21.2...v3.21.3)
|
@@ -49,6 +49,13 @@ module GoodJob
|
|
49
49
|
migration_pending_warning!
|
50
50
|
false
|
51
51
|
end
|
52
|
+
|
53
|
+
def cron_indices_migrated?
|
54
|
+
return true if connection.index_name_exists?(:good_jobs, :index_good_jobs_on_cron_key_and_created_at_cond)
|
55
|
+
|
56
|
+
migration_pending_warning!
|
57
|
+
false
|
58
|
+
end
|
52
59
|
end
|
53
60
|
|
54
61
|
# The ActiveJob job class, as a string
|
@@ -25,11 +25,11 @@ class RecreateGoodJobCronIndexesWithConditional < ActiveRecord::Migration<%= mig
|
|
25
25
|
|
26
26
|
dir.down do
|
27
27
|
unless connection.index_name_exists?(:good_jobs, :index_good_jobs_on_cron_key_and_created_at)
|
28
|
-
add_index :good_jobs, [:cron_key, :created_at],
|
28
|
+
add_index :good_jobs, [:cron_key, :created_at],
|
29
29
|
name: :index_good_jobs_on_cron_key_and_created_at, algorithm: :concurrently
|
30
30
|
end
|
31
31
|
unless connection.index_name_exists?(:good_jobs, :index_good_jobs_on_cron_key_and_cron_at)
|
32
|
-
add_index :good_jobs, [:cron_key, :cron_at],
|
32
|
+
add_index :good_jobs, [:cron_key, :cron_at], unique: true,
|
33
33
|
name: :index_good_jobs_on_cron_key_and_cron_at, algorithm: :concurrently
|
34
34
|
end
|
35
35
|
|
@@ -11,10 +11,10 @@ module GoodJob # :nodoc:
|
|
11
11
|
#
|
12
12
|
class SystemdService
|
13
13
|
def self.task_observer(_time, _output, thread_error) # :nodoc:
|
14
|
-
return if thread_error.is_a?
|
14
|
+
return if !thread_error || thread_error.is_a?(Concurrent::CancelledOperationError)
|
15
15
|
|
16
16
|
ActiveSupport::Notifications.instrument("systemd_watchdog_error.good_job", { error: thread_error })
|
17
|
-
GoodJob._on_thread_error(thread_error)
|
17
|
+
GoodJob._on_thread_error(thread_error)
|
18
18
|
end
|
19
19
|
|
20
20
|
# Indicates whether the service is actively notifying systemd's watchdog.
|
data/lib/good_job/version.rb
CHANGED
data/lib/good_job.rb
CHANGED
@@ -272,7 +272,7 @@ module GoodJob
|
|
272
272
|
def self.migrated?
|
273
273
|
# Always update with the most recent migration check
|
274
274
|
GoodJob::Execution.reset_column_information
|
275
|
-
GoodJob::Execution.
|
275
|
+
GoodJob::Execution.cron_indices_migrated?
|
276
276
|
end
|
277
277
|
|
278
278
|
ActiveSupport.run_load_hooks(:good_job, self)
|
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: 3.21.
|
4
|
+
version: 3.21.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ben Sheldon
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-12-
|
11
|
+
date: 2023-12-12 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activejob
|