good_job 3.17.0 → 3.17.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/CHANGELOG.md +34 -0
- data/app/models/good_job/base_execution.rb +2 -2
- data/app/models/good_job/base_record.rb +12 -0
- data/app/models/good_job/batch.rb +0 -1
- data/app/models/good_job/execution.rb +3 -6
- data/lib/good_job/http_server.rb +1 -1
- data/lib/good_job/notifier/process_heartbeat.rb +1 -1
- data/lib/good_job/sd_notify.rb +1 -1
- 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: 8c92206b4099b3be756adba01af60f4ef531eaf8cf02a9c9cdd17129214f929c
|
|
4
|
+
data.tar.gz: 29f1e72a6b21d2f1e3d073d8b1bd9f4f2a78e417f69c21c195fc795f62ac4e5c
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 2906c0b22dc6f6b0f0e78c607467533598e84dce2a29e654321293da877f1afd09ee59afd534d7a7b7f1481ae796d111b2492f62ec2cddcde843442e4262adbe
|
|
7
|
+
data.tar.gz: 0e8107f018f836e0d15f5836d93ebb8bdbe6e36381cba63680113302e3125f1a49d9aba5e05a2124ce50ec51cbfde7059ebed30b3cc5b64d859ce16867ae2c5e
|
data/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,39 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [v3.17.2](https://github.com/bensheldon/good_job/tree/v3.17.2) (2023-08-10)
|
|
4
|
+
|
|
5
|
+
[Full Changelog](https://github.com/bensheldon/good_job/compare/v3.17.1...v3.17.2)
|
|
6
|
+
|
|
7
|
+
**Fixed bugs:**
|
|
8
|
+
|
|
9
|
+
- 3.17.0 breaks health check endpoints [\#1033](https://github.com/bensheldon/good_job/issues/1033)
|
|
10
|
+
- Fix NoMethodError: undefined method `silence' for nil:NilClass [\#1037](https://github.com/bensheldon/good_job/pull/1037) ([afn](https://github.com/afn))
|
|
11
|
+
|
|
12
|
+
**Closed issues:**
|
|
13
|
+
|
|
14
|
+
- NoMethodError in ProcessHeartbeat if ActiveRecord logger is nil [\#1036](https://github.com/bensheldon/good_job/issues/1036)
|
|
15
|
+
- JRuby deprecation policy [\#1035](https://github.com/bensheldon/good_job/issues/1035)
|
|
16
|
+
|
|
17
|
+
**Merged pull requests:**
|
|
18
|
+
|
|
19
|
+
- Add helpful failure output for Sorbet linter [\#1038](https://github.com/bensheldon/good_job/pull/1038) ([bensheldon](https://github.com/bensheldon))
|
|
20
|
+
|
|
21
|
+
## [v3.17.1](https://github.com/bensheldon/good_job/tree/v3.17.1) (2023-08-08)
|
|
22
|
+
|
|
23
|
+
[Full Changelog](https://github.com/bensheldon/good_job/compare/v3.17.0...v3.17.1)
|
|
24
|
+
|
|
25
|
+
**Fixed bugs:**
|
|
26
|
+
|
|
27
|
+
- Fix Probe Server by retrying IO.select instead of returning early [\#1034](https://github.com/bensheldon/good_job/pull/1034) ([bensheldon](https://github.com/bensheldon))
|
|
28
|
+
|
|
29
|
+
**Closed issues:**
|
|
30
|
+
|
|
31
|
+
- Add database connection pool details to Process state [\#1014](https://github.com/bensheldon/good_job/issues/1014)
|
|
32
|
+
|
|
33
|
+
**Merged pull requests:**
|
|
34
|
+
|
|
35
|
+
- Add YARD warnings to lint script; fix YARD warnings [\#1032](https://github.com/bensheldon/good_job/pull/1032) ([bensheldon](https://github.com/bensheldon))
|
|
36
|
+
|
|
3
37
|
## [v3.17.0](https://github.com/bensheldon/good_job/tree/v3.17.0) (2023-08-06)
|
|
4
38
|
|
|
5
39
|
[Full Changelog](https://github.com/bensheldon/good_job/compare/v3.16.4...v3.17.0)
|
|
@@ -12,9 +12,9 @@ module GoodJob
|
|
|
12
12
|
self.table_name = 'good_jobs'
|
|
13
13
|
|
|
14
14
|
# With a given class name
|
|
15
|
-
# @!method job_class
|
|
15
|
+
# @!method job_class(name)
|
|
16
16
|
# @!scope class
|
|
17
|
-
# @param
|
|
17
|
+
# @param name [String] Execution class name
|
|
18
18
|
# @return [ActiveRecord::Relation]
|
|
19
19
|
scope :job_class, ->(name) { where(params_job_class.eq(name)) }
|
|
20
20
|
|
|
@@ -28,6 +28,18 @@ module GoodJob
|
|
|
28
28
|
false
|
|
29
29
|
end
|
|
30
30
|
|
|
31
|
+
# Runs the block with self.logger silenced.
|
|
32
|
+
# If self.logger is nil, simply runs the block.
|
|
33
|
+
def self.with_logger_silenced(&block)
|
|
34
|
+
# Assign to a local variable, just in case it's modified in another thread concurrently
|
|
35
|
+
logger = self.logger
|
|
36
|
+
if logger
|
|
37
|
+
logger.silence(&block)
|
|
38
|
+
else
|
|
39
|
+
yield
|
|
40
|
+
end
|
|
41
|
+
end
|
|
42
|
+
|
|
31
43
|
ActiveSupport.run_load_hooks(:good_job_base_record, self)
|
|
32
44
|
end
|
|
33
45
|
end
|
|
@@ -50,7 +50,6 @@ module GoodJob
|
|
|
50
50
|
)
|
|
51
51
|
|
|
52
52
|
# Create a new batch and enqueue it
|
|
53
|
-
# @param on_finish [String, Object] The class name of the callback job to be enqueued after the batch is finished
|
|
54
53
|
# @param properties [Hash] Additional properties to be stored on the batch
|
|
55
54
|
# @param block [Proc] Enqueue jobs within the block to add them to the batch
|
|
56
55
|
# @return [GoodJob::BatchRecord]
|
|
@@ -76,7 +76,7 @@ module GoodJob
|
|
|
76
76
|
}, if: -> { @_destroy_job }
|
|
77
77
|
|
|
78
78
|
# Get executions with given ActiveJob ID
|
|
79
|
-
# @!method active_job_id
|
|
79
|
+
# @!method active_job_id(active_job_id)
|
|
80
80
|
# @!scope class
|
|
81
81
|
# @param active_job_id [String]
|
|
82
82
|
# ActiveJob ID
|
|
@@ -115,7 +115,7 @@ module GoodJob
|
|
|
115
115
|
scope :creation_ordered, -> { order(created_at: :asc) }
|
|
116
116
|
|
|
117
117
|
# Order executions for de-queueing
|
|
118
|
-
# @!method dequeueing_ordered
|
|
118
|
+
# @!method dequeueing_ordered(parsed_queues)
|
|
119
119
|
# @!scope class
|
|
120
120
|
# @param parsed_queues [Hash]
|
|
121
121
|
# optional output of .queue_parser, parsed queues, will be used for
|
|
@@ -130,7 +130,7 @@ module GoodJob
|
|
|
130
130
|
end)
|
|
131
131
|
|
|
132
132
|
# Order executions in order of queues in array param
|
|
133
|
-
# @!method queue_ordered
|
|
133
|
+
# @!method queue_ordered(queues)
|
|
134
134
|
# @!scope class
|
|
135
135
|
# @param queues [Array<string] ordered names of queues
|
|
136
136
|
# @return [ActiveRecord::Relation]
|
|
@@ -300,9 +300,6 @@ module GoodJob
|
|
|
300
300
|
# Epoch timestamp when the job should be executed, if blank will delegate to the ActiveJob instance
|
|
301
301
|
# @param create_with_advisory_lock [Boolean]
|
|
302
302
|
# Whether to establish a lock on the {Execution} record after it is created.
|
|
303
|
-
# @param persist_immediately [Boolean]
|
|
304
|
-
# Whether to save the record immediately or just initialize it with values. When bulk-inserting
|
|
305
|
-
# jobs the caller takes care of the persistence and sets this parameter to `false`
|
|
306
303
|
# @return [Execution]
|
|
307
304
|
# The new {Execution} instance representing the queued ActiveJob job.
|
|
308
305
|
def self.enqueue(active_job, scheduled_at: nil, create_with_advisory_lock: false)
|
data/lib/good_job/http_server.rb
CHANGED
|
@@ -44,7 +44,7 @@ module GoodJob
|
|
|
44
44
|
while @running.true?
|
|
45
45
|
begin
|
|
46
46
|
ready_sockets, = IO.select([@server], nil, nil, SOCKET_READ_TIMEOUT)
|
|
47
|
-
|
|
47
|
+
next unless ready_sockets
|
|
48
48
|
|
|
49
49
|
client = @server.accept_nonblock(exception: false)
|
|
50
50
|
request = client.gets
|
|
@@ -23,7 +23,7 @@ module GoodJob # :nodoc:
|
|
|
23
23
|
def refresh_process
|
|
24
24
|
Rails.application.executor.wrap do
|
|
25
25
|
GoodJob::Process.with_connection(connection) do
|
|
26
|
-
GoodJob::Process.
|
|
26
|
+
GoodJob::Process.with_logger_silenced do
|
|
27
27
|
@process&.refresh_if_stale(cleanup: true)
|
|
28
28
|
end
|
|
29
29
|
end
|
data/lib/good_job/sd_notify.rb
CHANGED
|
@@ -91,7 +91,7 @@ module SdNotify
|
|
|
91
91
|
notify(FDSTORE, unset_env)
|
|
92
92
|
end
|
|
93
93
|
|
|
94
|
-
# @
|
|
94
|
+
# @return [Boolean] true if the service manager expects watchdog keep-alive
|
|
95
95
|
# notification messages to be sent from this process.
|
|
96
96
|
#
|
|
97
97
|
# If the $WATCHDOG_USEC environment variable is set,
|
data/lib/good_job/version.rb
CHANGED
data/lib/good_job.rb
CHANGED
|
@@ -111,7 +111,7 @@ module GoodJob
|
|
|
111
111
|
|
|
112
112
|
# Custom Active Record configuration that is class_eval'ed into +GoodJob::BaseRecord+
|
|
113
113
|
# @param block Custom Active Record configuration
|
|
114
|
-
# @
|
|
114
|
+
# @return [void]
|
|
115
115
|
#
|
|
116
116
|
# @example
|
|
117
117
|
# GoodJob.configure_active_record do
|
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.17.
|
|
4
|
+
version: 3.17.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: 2023-08-
|
|
11
|
+
date: 2023-08-10 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: activejob
|