good_job 3.12.8 → 3.13.0
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 +23 -0
- data/app/filters/good_job/jobs_filter.rb +13 -11
- data/app/models/good_job/job.rb +10 -0
- data/app/views/good_job/jobs/_table.erb +1 -1
- data/lib/good_job/cli.rb +4 -1
- data/lib/good_job/version.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: c83cf253d12daeb00363fe9c1b3a06b463c6944aa108aa4f884bf43b0d1f5c88
|
|
4
|
+
data.tar.gz: 71738f01485fb73b1dfa71396807f4570922d53aa186bf7aa1f9c27b21e4e559
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 25bbd078a94d5079b47d57c267ad72f7e6baa024230add7fd9c693c621eb8be7117aa517f715baba5b16cb5f0378eb0e407a41ea1569e923a16716ef0f4d391b
|
|
7
|
+
data.tar.gz: cf58cbaea01a1dd6714b53c6d618661908ccf46ef3deae58b3e2d6063f512e528d0d4f04850e7a3c4a1ccc59ece959a0919d19898488116898f78b9c78c7a5f6
|
data/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,28 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [v3.13.0](https://github.com/bensheldon/good_job/tree/v3.13.0) (2023-03-08)
|
|
4
|
+
|
|
5
|
+
[Full Changelog](https://github.com/bensheldon/good_job/compare/v3.12.8...v3.13.0)
|
|
6
|
+
|
|
7
|
+
**Implemented enhancements:**
|
|
8
|
+
|
|
9
|
+
- If logging to STDOUT in CLI set $stdout.sync = true [\#882](https://github.com/bensheldon/good_job/pull/882) ([blafri](https://github.com/blafri))
|
|
10
|
+
|
|
11
|
+
**Fixed bugs:**
|
|
12
|
+
|
|
13
|
+
- Don't load all Executions on Jobs Dashboard [\#878](https://github.com/bensheldon/good_job/pull/878) ([bensheldon](https://github.com/bensheldon))
|
|
14
|
+
|
|
15
|
+
**Closed issues:**
|
|
16
|
+
|
|
17
|
+
- No route matches \[POST\] "/scheduler-dashboard/jobs/\<id\>/retry" [\#880](https://github.com/bensheldon/good_job/issues/880)
|
|
18
|
+
- What is `concurrency_key` used for? [\#877](https://github.com/bensheldon/good_job/issues/877)
|
|
19
|
+
- ArgumentError in GoodJob::Jobs\#index [\#875](https://github.com/bensheldon/good_job/issues/875)
|
|
20
|
+
- Nonworking dashboard for job with many retries [\#809](https://github.com/bensheldon/good_job/issues/809)
|
|
21
|
+
|
|
22
|
+
**Merged pull requests:**
|
|
23
|
+
|
|
24
|
+
- Add aggressive test for async Batches [\#833](https://github.com/bensheldon/good_job/pull/833) ([bensheldon](https://github.com/bensheldon))
|
|
25
|
+
|
|
3
26
|
## [v3.12.8](https://github.com/bensheldon/good_job/tree/v3.12.8) (2023-03-06)
|
|
4
27
|
|
|
5
28
|
[Full Changelog](https://github.com/bensheldon/good_job/compare/v3.12.7...v3.12.8)
|
|
@@ -2,15 +2,17 @@
|
|
|
2
2
|
module GoodJob
|
|
3
3
|
class JobsFilter < BaseFilter
|
|
4
4
|
def states
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
5
|
+
@_states ||= begin
|
|
6
|
+
query = filtered_query(params.except(:state))
|
|
7
|
+
{
|
|
8
|
+
'scheduled' => query.scheduled.count,
|
|
9
|
+
'retried' => query.retried.count,
|
|
10
|
+
'queued' => query.queued.count,
|
|
11
|
+
'running' => query.running.count,
|
|
12
|
+
'succeeded' => query.succeeded.count,
|
|
13
|
+
'discarded' => query.discarded.count,
|
|
14
|
+
}
|
|
15
|
+
end
|
|
14
16
|
end
|
|
15
17
|
|
|
16
18
|
def filtered_query(filter_params = params)
|
|
@@ -42,13 +44,13 @@ module GoodJob
|
|
|
42
44
|
end
|
|
43
45
|
|
|
44
46
|
def filtered_count
|
|
45
|
-
filtered_query.unscope(:select).count
|
|
47
|
+
@_filtered_count ||= filtered_query.unscope(:select).count
|
|
46
48
|
end
|
|
47
49
|
|
|
48
50
|
private
|
|
49
51
|
|
|
50
52
|
def query_for_records
|
|
51
|
-
filtered_query.
|
|
53
|
+
filtered_query.includes_advisory_locks
|
|
52
54
|
end
|
|
53
55
|
|
|
54
56
|
def default_base_query
|
data/app/models/good_job/job.rb
CHANGED
|
@@ -136,6 +136,16 @@ module GoodJob
|
|
|
136
136
|
error || executions[-2]&.error
|
|
137
137
|
end
|
|
138
138
|
|
|
139
|
+
# Errors for the job to be displayed in the Dashboard.
|
|
140
|
+
# @return [String]
|
|
141
|
+
def display_error
|
|
142
|
+
return error if error.present?
|
|
143
|
+
|
|
144
|
+
serialized_params.fetch('exception_executions', {}).map do |exception, count|
|
|
145
|
+
"#{exception}: #{count}"
|
|
146
|
+
end.join(', ')
|
|
147
|
+
end
|
|
148
|
+
|
|
139
149
|
# Return formatted serialized_params for display in the dashboard
|
|
140
150
|
# @return [Hash]
|
|
141
151
|
def display_serialized_params
|
|
@@ -82,7 +82,7 @@
|
|
|
82
82
|
bs_toggle: "popover",
|
|
83
83
|
bs_trigger: "hover focus click",
|
|
84
84
|
bs_placement: "bottom",
|
|
85
|
-
bs_content: job.
|
|
85
|
+
bs_content: job.display_error,
|
|
86
86
|
} %>
|
|
87
87
|
<% else %>
|
|
88
88
|
<span class="badge bg-secondary bg-opacity-50 rounded-pill"><%= job.executions_count %></span>
|
data/lib/good_job/cli.rb
CHANGED
|
@@ -148,7 +148,10 @@ module GoodJob
|
|
|
148
148
|
# Rails or from the application can be set up here.
|
|
149
149
|
def set_up_application!
|
|
150
150
|
require RAILS_ENVIRONMENT_RB
|
|
151
|
-
return
|
|
151
|
+
return unless GoodJob::CLI.log_to_stdout?
|
|
152
|
+
|
|
153
|
+
$stdout.sync = true
|
|
154
|
+
return if ActiveSupport::Logger.logger_outputs_to?(GoodJob.logger, $stdout)
|
|
152
155
|
|
|
153
156
|
GoodJob::LogSubscriber.loggers << ActiveSupport::TaggedLogging.new(ActiveSupport::Logger.new($stdout))
|
|
154
157
|
GoodJob::LogSubscriber.reset_logger
|
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: 3.
|
|
4
|
+
version: 3.13.0
|
|
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-03-
|
|
11
|
+
date: 2023-03-08 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: activejob
|