good_job 3.29.2 → 3.29.4

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: '035847331e792e45f5ecc5c94f6038bd9955e022fc3dcdf27263be0bf1e3c02d'
4
- data.tar.gz: 7068ca56d21b29509841b37386e74ef9b0d3f761e0ce454b3d46522a685ffaa4
3
+ metadata.gz: dc61f98ee52126091970de8db6c13269794a13d5f17d87fc20bd821eb77fa50a
4
+ data.tar.gz: 99ccfe1fcbaaf4ca5a7c052fdb7c14687a3a41410996e1b03d55ced4ba22ccec
5
5
  SHA512:
6
- metadata.gz: 0a3bd5801bcc975e25ac1586b7b392ec3d4e6113338ac18d89c29296a4e28c746c54f9e7c4e4e1343a0ba2f033e5debffb337b4bb54e576f05812d9d7751315d
7
- data.tar.gz: 8b004560dc95421b474e5ec129b5a0dc2ef2ec20d7ee419d141d591bf29998eb5aaca585cb8a94b146ed9ecd691819062d2faffb66a247b0287488e3e0a62943
6
+ metadata.gz: 556115969cd40fb508c74443aa5663aef443206a34f4c39801501a4eded43511be02fbb29620907e99444a51b1059dca218fb15fab25c174f6aec6f05edd9e02
7
+ data.tar.gz: 69703ccbbd7a9deedd0bc905455ac5ee9db5f82958279b854dde01578113ad370723ed53c7aed0aa1e7b4bc4e4146f9859b6bcb2596953151fc275c0a8306702
data/CHANGELOG.md CHANGED
@@ -1,5 +1,27 @@
1
1
  # Changelog
2
2
 
3
+ ## [v3.29.4](https://github.com/bensheldon/good_job/tree/v3.29.4) (2024-06-18)
4
+
5
+ [Full Changelog](https://github.com/bensheldon/good_job/compare/v3.29.3...v3.29.4)
6
+
7
+ **Fixed bugs:**
8
+
9
+ - Fix display of empty array in flash messages [\#1377](https://github.com/bensheldon/good_job/pull/1377) ([andynu](https://github.com/andynu))
10
+ - Fix counts in tab links with filters [\#1373](https://github.com/bensheldon/good_job/pull/1373) ([SebouChu](https://github.com/SebouChu))
11
+
12
+ ## [v3.29.3](https://github.com/bensheldon/good_job/tree/v3.29.3) (2024-06-06)
13
+
14
+ [Full Changelog](https://github.com/bensheldon/good_job/compare/v3.29.2...v3.29.3)
15
+
16
+ **Fixed bugs:**
17
+
18
+ - Synchronize `CapsuleTracker#renew` [\#1369](https://github.com/bensheldon/good_job/pull/1369) ([bensheldon](https://github.com/bensheldon))
19
+
20
+ **Closed issues:**
21
+
22
+ - docs: Basic auth route mount example improvement [\#1368](https://github.com/bensheldon/good_job/issues/1368)
23
+ - Tips for debugging/optimizing slow dashboard? \(45 second response time\) [\#1366](https://github.com/bensheldon/good_job/issues/1366)
24
+
3
25
  ## [v3.29.2](https://github.com/bensheldon/good_job/tree/v3.29.2) (2024-05-23)
4
26
 
5
27
  [Full Changelog](https://github.com/bensheldon/good_job/compare/v3.29.1...v3.29.2)
data/README.md CHANGED
@@ -404,7 +404,7 @@ GoodJob includes a Dashboard as a mountable `Rails::Engine`.
404
404
  ```ruby
405
405
  # config/initializers/good_job.rb
406
406
  GoodJob::Engine.middleware.use(Rack::Auth::Basic) do |username, password|
407
- ActiveSupport::SecurityUtils.secure_compare(Rails.application.credentials.good_job_username, username) &&
407
+ ActiveSupport::SecurityUtils.secure_compare(Rails.application.credentials.good_job_username, username) &
408
408
  ActiveSupport::SecurityUtils.secure_compare(Rails.application.credentials.good_job_password, password)
409
409
  end
410
410
  ```
@@ -101,7 +101,8 @@ module GoodJob # :nodoc:
101
101
 
102
102
  def refresh
103
103
  self.state = self.class.process_state
104
- reload.update(state: state, updated_at: Time.current)
104
+ reload # verify the record still exists in the database
105
+ update(state: state, updated_at: Time.current)
105
106
  rescue ActiveRecord::RecordNotFound
106
107
  @new_record = true
107
108
  self.created_at = self.updated_at = nil
@@ -1,5 +1,5 @@
1
1
  <div class="toast-container position-fixed p-3 start-50 translate-middle-x">
2
- <% if notice %>
2
+ <% if notice.present? %>
3
3
  <div class="toast" role="alert" aria-live="assertive" aria-atomic="true">
4
4
  <div class="toast-body d-flex align-items-center gap-2">
5
5
  <%= render_icon "check", class: "flex-shrink-0 text-success" %>
@@ -8,7 +8,7 @@
8
8
  </div>
9
9
  </div>
10
10
  <% end %>
11
- <% if alert %>
11
+ <% if alert.present? %>
12
12
  <div class="toast" role="alert" aria-live="assertive" aria-atomic="true">
13
13
  <div class="toast-body d-flex align-items-center gap-2">
14
14
  <%= render_icon "exclamation", class: "flex-shrink-0 text-danger" %>
@@ -47,7 +47,7 @@
47
47
  </div>
48
48
  <% end %>
49
49
 
50
- <ul data-controller="async-values" data-async-values-url-value="<%= metrics_job_status_path %>" data-live-poll-region="filter-tabs" class="nav nav-tabs my-3">
50
+ <ul data-controller="async-values" data-async-values-url-value="<%= metrics_job_status_path(filter.to_params) %>" data-live-poll-region="filter-tabs" class="nav nav-tabs my-3">
51
51
  <li class="nav-item">
52
52
  <%= link_to t(".all"), filter.to_params(state: nil), class: "nav-link #{'active' if params[:state].blank?}" %>
53
53
  </li>
@@ -143,8 +143,10 @@ module GoodJob # :nodoc:
143
143
  # @param silent [Boolean] Whether to silence logging.
144
144
  # @return [void]
145
145
  def renew(silent: false)
146
- GoodJob::Process.with_logger_silenced(silent: silent) do
147
- @record&.refresh_if_stale(cleanup: true)
146
+ synchronize do
147
+ GoodJob::Process.with_logger_silenced(silent: silent) do
148
+ @record&.refresh_if_stale(cleanup: true)
149
+ end
148
150
  end
149
151
  end
150
152
 
@@ -2,7 +2,7 @@
2
2
 
3
3
  module GoodJob
4
4
  # GoodJob gem version.
5
- VERSION = '3.29.2'
5
+ VERSION = '3.29.4'
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.29.2
4
+ version: 3.29.4
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-05-23 00:00:00.000000000 Z
11
+ date: 2024-06-18 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activejob