good_job 4.6.0 → 4.7.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 +13 -0
- data/app/models/good_job/cron_entry.rb +11 -1
- data/app/views/good_job/batches/_jobs.erb +7 -0
- data/app/views/good_job/jobs/_table.erb +7 -0
- data/config/locales/de.yml +1 -0
- data/config/locales/en.yml +1 -0
- data/config/locales/es.yml +1 -0
- data/config/locales/fr.yml +1 -0
- data/config/locales/it.yml +1 -0
- data/config/locales/ja.yml +1 -0
- data/config/locales/ko.yml +1 -0
- data/config/locales/nl.yml +1 -0
- data/config/locales/pt-BR.yml +1 -0
- data/config/locales/ru.yml +1 -0
- data/config/locales/tr.yml +1 -0
- data/config/locales/uk.yml +1 -0
- 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: 00f71f047b33832b758797f8fb9c7987a13eae1abb1750467dcbbab12c7680b0
|
4
|
+
data.tar.gz: 4a9f501a236f45781904d2468cef99d05cea42ac5d76568d8b72ae437823e3e6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 575e7338adaaaa661f4f0d219ddbaac20dff3547f9878098d51ab71a54dce5660467d2f45d492dd6fa79496143f6482e170557a7b8a230e25853297c9811eba6
|
7
|
+
data.tar.gz: 5bdd469825d81387e4071900576ea664e820c98c74f7d6a710d3d39fc5c750af4db0a63fc4d0e0af9faf5481e73f1b6107b3ff88c77a257c9c49d02dda7667f8
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,18 @@
|
|
1
1
|
# Changelog
|
2
2
|
|
3
|
+
## [v4.7.0](https://github.com/bensheldon/good_job/tree/v4.7.0) (2024-12-31)
|
4
|
+
|
5
|
+
[Full Changelog](https://github.com/bensheldon/good_job/compare/v4.6.0...v4.7.0)
|
6
|
+
|
7
|
+
**Implemented enhancements:**
|
8
|
+
|
9
|
+
- Expose good job labels in dashboard [\#1561](https://github.com/bensheldon/good_job/pull/1561) ([BClark88](https://github.com/BClark88))
|
10
|
+
|
11
|
+
**Merged pull requests:**
|
12
|
+
|
13
|
+
- Allow cron configuration `class` value to be a proc [\#1566](https://github.com/bensheldon/good_job/pull/1566) ([bensheldon](https://github.com/bensheldon))
|
14
|
+
- Add Ruby 3.4 to CI [\#1565](https://github.com/bensheldon/good_job/pull/1565) ([Earlopain](https://github.com/Earlopain))
|
15
|
+
|
3
16
|
## [v4.6.0](https://github.com/bensheldon/good_job/tree/v4.6.0) (2024-12-12)
|
4
17
|
|
5
18
|
[Full Changelog](https://github.com/bensheldon/good_job/compare/v4.5.1...v4.6.0)
|
@@ -101,8 +101,12 @@ module GoodJob # :nodoc:
|
|
101
101
|
current_thread.cron_key = key
|
102
102
|
current_thread.cron_at = cron_at
|
103
103
|
|
104
|
-
configured_job = job_class.constantize.set(set_value)
|
105
104
|
I18n.with_locale(I18n.default_locale) do
|
105
|
+
job_klass = job_class_value
|
106
|
+
job_klass = job_klass.constantize if job_klass.is_a?(String)
|
107
|
+
next unless job_klass.is_a?(Class)
|
108
|
+
|
109
|
+
configured_job = job_klass.set(set_value)
|
106
110
|
kwargs_value.present? ? configured_job.perform_later(*args_value, **kwargs_value) : configured_job.perform_later(*args_value)
|
107
111
|
end
|
108
112
|
end
|
@@ -118,6 +122,7 @@ module GoodJob # :nodoc:
|
|
118
122
|
set: display_property(set),
|
119
123
|
description: display_property(description),
|
120
124
|
}.tap do |properties|
|
125
|
+
properties[:class] = display_property(job_class) if job_class.present?
|
121
126
|
properties[:args] = display_property(args) if args.present?
|
122
127
|
properties[:kwargs] = display_property(kwargs) if kwargs.present?
|
123
128
|
end
|
@@ -160,6 +165,11 @@ module GoodJob # :nodoc:
|
|
160
165
|
@_fugit ||= Fugit.parse(cron)
|
161
166
|
end
|
162
167
|
|
168
|
+
def job_class_value
|
169
|
+
value = job_class || nil
|
170
|
+
value.respond_to?(:call) ? value.call : value
|
171
|
+
end
|
172
|
+
|
163
173
|
def set_value
|
164
174
|
value = set || {}
|
165
175
|
value.respond_to?(:call) ? value.call : value
|
@@ -5,6 +5,7 @@
|
|
5
5
|
<div class="col-4"><%= t("good_job.models.batch.jobs") %></div>
|
6
6
|
<div class="d-none d-lg-block col-lg-1 text-lg-center"><%= t "good_job.models.job.queue" %></div>
|
7
7
|
<div class="d-none d-lg-block col-lg-1 text-lg-end"><%= t "good_job.models.job.priority" %></div>
|
8
|
+
<div class="d-none d-lg-block col-lg-1 text-lg-end"><%= t "good_job.models.job.labels" %></div>
|
8
9
|
<div class="d-none d-lg-block col-lg-1 text-lg-end"><%= t "good_job.models.job.attempts" %></div>
|
9
10
|
<div class="col text-end">
|
10
11
|
<%= tag.button type: "button", class: "btn btn-sm text-muted", role: "button",
|
@@ -33,6 +34,12 @@
|
|
33
34
|
<div class="d-lg-none small text-muted mt-1"><%= t "good_job.models.job.priority" %></div>
|
34
35
|
<span class="font-monospace fw-bold"><%= job.priority %></span>
|
35
36
|
</div>
|
37
|
+
<div class="col-4 col-lg-1 text-lg-end">
|
38
|
+
<div class="d-lg-none small text-muted mt-1"><%= t "good_job.models.job.labels" %></div>
|
39
|
+
<% job.labels&.each do |label| %>
|
40
|
+
<span class="badge rounded-pill bg-secondary font-monospace"><%= label %></span>
|
41
|
+
<% end %>
|
42
|
+
</div>
|
36
43
|
<div class="col-4 col-lg-1 text-lg-end">
|
37
44
|
<div class="d-lg-none small text-muted mt-1"><%= t "good_job.models.job.attempts" %></div>
|
38
45
|
<% if job.error %>
|
@@ -35,6 +35,7 @@
|
|
35
35
|
</div>
|
36
36
|
<div class="d-none d-lg-block col-lg-1 text-lg-center"><%= t "good_job.models.job.queue" %></div>
|
37
37
|
<div class="d-none d-lg-block col-lg-1 text-lg-end"><%= t "good_job.models.job.priority" %></div>
|
38
|
+
<div class="d-none d-lg-block col-lg-1 text-lg-end"><%= t "good_job.models.job.labels" %></div>
|
38
39
|
<div class="d-none d-lg-block col-lg-1 text-lg-end"><%= t "good_job.models.job.attempts" %></div>
|
39
40
|
<div class="col text-end">
|
40
41
|
<%= tag.button type: "button", class: "btn btn-sm text-muted", role: "button",
|
@@ -82,6 +83,12 @@
|
|
82
83
|
<div class="d-lg-none small text-muted mt-1"><%= t "good_job.models.job.priority" %></div>
|
83
84
|
<%= job.priority %>
|
84
85
|
</div>
|
86
|
+
<div class="col-4 col-lg-1 text-wrap text-lg-end">
|
87
|
+
<div class="d-lg-none small text-muted mt-1"><%= t "good_job.models.job.labels" %></div>
|
88
|
+
<% job.labels&.each do |label| %>
|
89
|
+
<span class="badge rounded-pill bg-secondary font-monospace"><%= label %></span>
|
90
|
+
<% end %>
|
91
|
+
</div>
|
85
92
|
<div class="col-4 col-lg-1 text-lg-end">
|
86
93
|
<div class="d-lg-none small text-muted mt-1"><%= t "good_job.models.job.attempts" %></div>
|
87
94
|
<% if job.error %>
|
data/config/locales/de.yml
CHANGED
data/config/locales/en.yml
CHANGED
data/config/locales/es.yml
CHANGED
data/config/locales/fr.yml
CHANGED
data/config/locales/it.yml
CHANGED
data/config/locales/ja.yml
CHANGED
data/config/locales/ko.yml
CHANGED
data/config/locales/nl.yml
CHANGED
data/config/locales/pt-BR.yml
CHANGED
data/config/locales/ru.yml
CHANGED
data/config/locales/tr.yml
CHANGED
data/config/locales/uk.yml
CHANGED
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: 4.
|
4
|
+
version: 4.7.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: 2024-12-
|
11
|
+
date: 2024-12-31 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activejob
|