good_job 3.16.0 → 3.16.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 20bb64485159969378a5abf5d960de13a3f27df63846f85cda6e4ef410c9af23
4
- data.tar.gz: de0d39b68577c973ca4a4c9d9bccd8bda29bad7e6ca5a936112db7c8df6b038b
3
+ metadata.gz: df700f1e4e911894d7f47d8b46c6159200e9f68bc6c7db9c9d8592999320851f
4
+ data.tar.gz: 0f8994e16848891c3a2a41064b8ee12555c9880035735ed1635a6ffd888ef276
5
5
  SHA512:
6
- metadata.gz: 9fa9474d0ee2ff9e8e47aa5e3cc31d6cd1924c7d00276a9da2bc4611b970ea80d68a0bc79c9da7f4266c85e0bedfc491860dabff4d4e1088d485a11a21a895f5
7
- data.tar.gz: eb6a2ea5cdacd25fd930aab7eba6b498ffb5998fa82c78e552f7acaebf59f6f6cd950fb6488e4c317b461ff8931df5250820cdeb46d40a4047a1e8c24495756b
6
+ metadata.gz: f73d66cf94b957e59aaf4352d0bd0f0e4d5477144875a5923f846f5dadaf938b7a3f6c1f0cf21ae353258145e5ad2f4cc4c98a5c433d77c6b45b74c315358cdc
7
+ data.tar.gz: 99a1ba23209daa2890fee61443a91ff61a5ce2c8b7a5c5eeb55f54d85cc8166b97c3551d132a765ef6907924c78291e52d1b5cec705a9829f833f688506ecd76
data/CHANGELOG.md CHANGED
@@ -1,5 +1,29 @@
1
1
  # Changelog
2
2
 
3
+ ## [v3.16.2](https://github.com/bensheldon/good_job/tree/v3.16.2) (2023-07-13)
4
+
5
+ [Full Changelog](https://github.com/bensheldon/good_job/compare/v3.16.1...v3.16.2)
6
+
7
+ **Closed issues:**
8
+
9
+ - Support for customized job display name [\#956](https://github.com/bensheldon/good_job/issues/956)
10
+
11
+ **Merged pull requests:**
12
+
13
+ - Add `GoodJob::Job#display_name` to allow customizing dashboard job display [\#1008](https://github.com/bensheldon/good_job/pull/1008) ([paul](https://github.com/paul))
14
+
15
+ ## [v3.16.1](https://github.com/bensheldon/good_job/tree/v3.16.1) (2023-07-11)
16
+
17
+ [Full Changelog](https://github.com/bensheldon/good_job/compare/v3.16.0...v3.16.1)
18
+
19
+ **Fixed bugs:**
20
+
21
+ - Wrap Notifier's `refresh_process` with Rails executor [\#1007](https://github.com/bensheldon/good_job/pull/1007) ([bensheldon](https://github.com/bensheldon))
22
+
23
+ **Closed issues:**
24
+
25
+ - uninitialized constant GoodJob::Process [\#1006](https://github.com/bensheldon/good_job/issues/1006)
26
+
3
27
  ## [v3.16.0](https://github.com/bensheldon/good_job/tree/v3.16.0) (2023-07-10)
4
28
 
5
29
  [Full Changelog](https://github.com/bensheldon/good_job/compare/v3.15.14...v3.16.0)
data/README.md CHANGED
@@ -1,7 +1,7 @@
1
1
  # GoodJob
2
2
 
3
3
  [![Gem Version](https://badge.fury.io/rb/good_job.svg)](https://rubygems.org/gems/good_job)
4
- [![Test Status](https://github.com/bensheldon/good_job/workflows/Test/badge.svg)](https://github.com/bensheldon/good_job/actions)
4
+ [![Test Status](https://github.com/bensheldon/good_job/actions/workflows/test.yml/badge.svg?branch=main)](https://github.com/bensheldon/good_job/actions/workflows/test.yml?query=branch%3Amain)
5
5
  [![Ruby Toolbox](https://img.shields.io/badge/dynamic/json?color=blue&label=Ruby%20Toolbox&query=%24.projects%5B0%5D.score&url=https%3A%2F%2Fwww.ruby-toolbox.com%2Fapi%2Fprojects%2Fcompare%2Fgood_job&logo=data:image/svg+xml;base64,PHN2ZyBhcmlhLWhpZGRlbj0idHJ1ZSIgZm9jdXNhYmxlPSJmYWxzZSIgZGF0YS1wcmVmaXg9ImZhcyIgZGF0YS1pY29uPSJmbGFzayIgY2xhc3M9InN2Zy1pbmxpbmUtLWZhIGZhLWZsYXNrIGZhLXctMTQiIHJvbGU9ImltZyIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB2aWV3Qm94PSIwIDAgNDQ4IDUxMiI+PHBhdGggZmlsbD0id2hpdGUiIGQ9Ik00MzcuMiA0MDMuNUwzMjAgMjE1VjY0aDhjMTMuMyAwIDI0LTEwLjcgMjQtMjRWMjRjMC0xMy4zLTEwLjctMjQtMjQtMjRIMTIwYy0xMy4zIDAtMjQgMTAuNy0yNCAyNHYxNmMwIDEzLjMgMTAuNyAyNCAyNCAyNGg4djE1MUwxMC44IDQwMy41Qy0xOC41IDQ1MC42IDE1LjMgNTEyIDcwLjkgNTEyaDMwNi4yYzU1LjcgMCA4OS40LTYxLjUgNjAuMS0xMDguNXpNMTM3LjkgMzIwbDQ4LjItNzcuNmMzLjctNS4yIDUuOC0xMS42IDUuOC0xOC40VjY0aDY0djE2MGMwIDYuOSAyLjIgMTMuMiA1LjggMTguNGw0OC4yIDc3LjZoLTE3MnoiPjwvcGF0aD48L3N2Zz4=)](https://www.ruby-toolbox.com/projects/good_job)
6
6
 
7
7
  GoodJob is a multithreaded, Postgres-based, ActiveJob backend for Ruby on Rails.
@@ -149,6 +149,12 @@ module GoodJob
149
149
  })
150
150
  end
151
151
 
152
+ # Used when displaying this job in the GoodJob dashboard.
153
+ # @return [String]
154
+ def display_name
155
+ job_class
156
+ end
157
+
152
158
  # Tests whether the job is being executed right now.
153
159
  # @return [Boolean]
154
160
  def running?
@@ -23,7 +23,7 @@
23
23
  <div class="row align-items-center">
24
24
  <div class="col-lg-4">
25
25
  <%= tag.code link_to(job.id, job_path(job), class: "small text-muted text-decoration-none") %>
26
- <%= tag.h5 tag.code(link_to(job.job_class, job_path(job), class: "text-reset text-decoration-none")), class: "text-reset mb-0" %>
26
+ <%= tag.h5 tag.code(link_to(job.display_name, job_path(job), class: "text-reset text-decoration-none")), class: "text-reset mb-0" %>
27
27
  </div>
28
28
  <div class="col-4 col-lg-1 text-lg-center">
29
29
  <div class="d-lg-none small text-muted mt-1"><%=t "good_job.models.job.queue" %></div>
@@ -64,7 +64,7 @@
64
64
  <%= check_box_tag 'job_ids[]', job.id, false, id: dom_id(job, :checkbox), data: { "checkbox-toggle-each": "job_ids" } %>
65
65
  <div class="ms-2">
66
66
  <%= tag.code link_to(job.id, job_path(job), class: "small text-muted text-decoration-none") %>
67
- <%= tag.h5 tag.code(link_to(job.job_class, job_path(job), class: "text-reset text-decoration-none")), class: "text-reset mb-0" %>
67
+ <%= tag.h5 tag.code(link_to(job.display_name, job_path(job), class: "text-reset text-decoration-none")), class: "text-reset mb-0" %>
68
68
  <% if job.error %>
69
69
  <div class="mt-1 small">
70
70
  <strong class="small"><%=t "good_job.shared.error" %>:</strong>
@@ -13,7 +13,7 @@
13
13
  </nav>
14
14
  <div class="row align-items-center">
15
15
  <div class="col-md-5">
16
- <h2 class="mb-2 mb-md-0"><%= tag.code @job.job_class %></h2>
16
+ <h2 class="mb-2 mb-md-0"><%= tag.code @job.display_name %></h2>
17
17
  </div>
18
18
  <div class="col-6 col-md-2">
19
19
  <div class="small text-muted text-uppercase"><%= t "good_job.models.job.queue" %></div>
@@ -21,9 +21,11 @@ module GoodJob # :nodoc:
21
21
  end
22
22
 
23
23
  def refresh_process
24
- GoodJob::Process.with_connection(connection) do
25
- Process.logger.silence do
26
- @process&.refresh_if_stale(cleanup: true)
24
+ Rails.application.executor.wrap do
25
+ GoodJob::Process.with_connection(connection) do
26
+ GoodJob::Process.logger.silence do
27
+ @process&.refresh_if_stale(cleanup: true)
28
+ end
27
29
  end
28
30
  end
29
31
  end
@@ -2,7 +2,7 @@
2
2
 
3
3
  module GoodJob
4
4
  # GoodJob gem version.
5
- VERSION = '3.16.0'
5
+ VERSION = '3.16.2'
6
6
 
7
7
  # GoodJob version as Gem::Version object
8
8
  GEM_VERSION = Gem::Version.new(VERSION)
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.16.0
4
+ version: 3.16.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-07-10 00:00:00.000000000 Z
11
+ date: 2023-07-13 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activejob