good_job 4.11.2 → 4.12.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 +27 -1
- data/app/models/good_job/job.rb +3 -3
- data/app/views/good_job/cron_entries/index.html.erb +17 -8
- data/app/views/good_job/shared/_secondary_navbar.erb +1 -1
- data/app/views/layouts/good_job/application.html.erb +7 -6
- data/config/locales/de.yml +4 -0
- data/config/locales/en.yml +4 -0
- data/config/locales/es.yml +4 -0
- data/config/locales/fr.yml +4 -0
- data/config/locales/it.yml +4 -0
- data/config/locales/ja.yml +4 -0
- data/config/locales/ko.yml +4 -0
- data/config/locales/nl.yml +4 -0
- data/config/locales/pt-BR.yml +4 -0
- data/config/locales/ru.yml +4 -0
- data/config/locales/tr.yml +4 -0
- data/config/locales/uk.yml +4 -0
- data/exe/good_job +0 -1
- data/lib/generators/good_job/templates/install/migrations/create_good_jobs.rb.erb +1 -0
- data/lib/generators/good_job/templates/update/migrations/04_add_index_good_jobs_job_class.rb.erb +17 -0
- data/lib/good_job/cli.rb +7 -2
- data/lib/good_job/version.rb +1 -1
- data/lib/good_job.rb +1 -1
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f8d2230721300457a34764edf4b7b05a7c2e1e58931186a594b505f13c3a35f0
|
4
|
+
data.tar.gz: 9330aa1ed9b6fea281bbe9cf95c6a46d96f6eb670b12041d113fb56c89228d87
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a545269af550ef4a99d353d2fa0f08c60c002651682dc58b831a85a63aff0703506c19047230d09572de99810c4754e184ec2fcb852429f84330fdde70e855ba
|
7
|
+
data.tar.gz: cc75f90006b8e24237759f5648ff78a3799c5a67b055df61c73dcc1f71f2cc7b40e3a60f7898f7688609ec677587fe7fd11762a7dbcaa3af75d33319e8f08c58
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,31 @@
|
|
1
1
|
# Changelog
|
2
2
|
|
3
|
+
## [v4.12.0](https://github.com/bensheldon/good_job/tree/v4.12.0) (2025-09-22)
|
4
|
+
|
5
|
+
[Full Changelog](https://github.com/bensheldon/good_job/compare/v4.11.2...v4.12.0)
|
6
|
+
|
7
|
+
**Implemented enhancements:**
|
8
|
+
|
9
|
+
- Allow `GoodJob::Cli.log_to_stdout =` to be set by the parent application [\#1680](https://github.com/bensheldon/good_job/pull/1680) ([bensheldon](https://github.com/bensheldon))
|
10
|
+
- Optimize job\_class scope performance by using column instead of JSON extraction [\#1672](https://github.com/bensheldon/good_job/pull/1672) ([ScotterC](https://github.com/ScotterC))
|
11
|
+
- Add state column to cron entries table [\#1652](https://github.com/bensheldon/good_job/pull/1652) ([gregplumbly](https://github.com/gregplumbly))
|
12
|
+
|
13
|
+
**Fixed bugs:**
|
14
|
+
|
15
|
+
- Reorganize Dashboard header, ensure favicon svg is encoded; fix double mt-auto [\#1668](https://github.com/bensheldon/good_job/pull/1668) ([bensheldon](https://github.com/bensheldon))
|
16
|
+
|
17
|
+
**Closed issues:**
|
18
|
+
|
19
|
+
- GoodJob Cron unique index [\#1678](https://github.com/bensheldon/good_job/issues/1678)
|
20
|
+
- params\_job\_class JSON extraction causing performance issues - why not use job\_class column? [\#1671](https://github.com/bensheldon/good_job/issues/1671)
|
21
|
+
- Good Job process stalling and CPU at 100% [\#1669](https://github.com/bensheldon/good_job/issues/1669)
|
22
|
+
|
23
|
+
**Merged pull requests:**
|
24
|
+
|
25
|
+
- Update sorbet/tapioca [\#1681](https://github.com/bensheldon/good_job/pull/1681) ([bensheldon](https://github.com/bensheldon))
|
26
|
+
- Remove obsolete property from tests [\#1676](https://github.com/bensheldon/good_job/pull/1676) ([RDIL](https://github.com/RDIL))
|
27
|
+
- Bump actions/checkout from 4 to 5 [\#1673](https://github.com/bensheldon/good_job/pull/1673) ([dependabot[bot]](https://github.com/apps/dependabot))
|
28
|
+
|
3
29
|
## [v4.11.2](https://github.com/bensheldon/good_job/tree/v4.11.2) (2025-08-06)
|
4
30
|
|
5
31
|
[Full Changelog](https://github.com/bensheldon/good_job/compare/v4.11.1...v4.11.2)
|
@@ -1024,7 +1050,7 @@
|
|
1024
1050
|
|
1025
1051
|
**Fixed bugs:**
|
1026
1052
|
|
1027
|
-
- Skip `RecordAlreadyAdvisoryLockedError` during mass-update action [\#1158](https://github.com/bensheldon/good_job/pull/1158) ([
|
1053
|
+
- Skip `RecordAlreadyAdvisoryLockedError` during mass-update action [\#1158](https://github.com/bensheldon/good_job/pull/1158) ([justinallenmarsh](https://github.com/justinallenmarsh))
|
1028
1054
|
|
1029
1055
|
**Closed issues:**
|
1030
1056
|
|
data/app/models/good_job/job.rb
CHANGED
@@ -239,7 +239,7 @@ module GoodJob
|
|
239
239
|
end
|
240
240
|
|
241
241
|
def params_job_class
|
242
|
-
|
242
|
+
arel_table[:job_class]
|
243
243
|
end
|
244
244
|
|
245
245
|
def params_execution_count
|
@@ -250,8 +250,8 @@ module GoodJob
|
|
250
250
|
)
|
251
251
|
end
|
252
252
|
|
253
|
-
def
|
254
|
-
return true if connection.index_name_exists?(:good_jobs, :
|
253
|
+
def job_class_index_migrated?
|
254
|
+
return true if connection.index_name_exists?(:good_jobs, :index_good_jobs_on_job_class)
|
255
255
|
|
256
256
|
migration_pending_warning!
|
257
257
|
false
|
@@ -6,12 +6,13 @@
|
|
6
6
|
<div class="list-group list-group-flush text-nowrap" role="table">
|
7
7
|
<header class="list-group-item body-secondary">
|
8
8
|
<div class="row small text-muted text-uppercase align-items-center">
|
9
|
-
<div class="col-
|
10
|
-
<div class="col-
|
11
|
-
<div class="col-
|
12
|
-
<div class="col-
|
13
|
-
<div class="col-
|
14
|
-
<div class="col
|
9
|
+
<div class="col-lg-2"></div>
|
10
|
+
<div class="col-lg-2 d-none d-lg-block"><%= t "good_job.models.cron.class" %></div>
|
11
|
+
<div class="col-lg-2 d-none d-lg-block"><%= t "good_job.models.cron.schedule" %></div>
|
12
|
+
<div class="col-lg-2 d-none d-lg-block"><%= t "good_job.models.cron.next_scheduled" %></div>
|
13
|
+
<div class="col-lg-1 d-none d-lg-block"><%= t "good_job.models.cron.last_run" %></div>
|
14
|
+
<div class="col-lg-1 d-none d-lg-block"><%= t "good_job.models.cron.status" %></div>
|
15
|
+
<div class="col-lg-2 text-end">
|
15
16
|
<%= tag.button type: "button", class: "btn btn-sm text-muted", role: "button",
|
16
17
|
data: { bs_toggle: "collapse", bs_target: ".cron-entry-properties" },
|
17
18
|
aria: { expanded: false, controls: @cron_entries.map { |cron_entry| "##{dom_id(cron_entry, 'properties')}" }.join(" ") } do %>
|
@@ -37,13 +38,21 @@
|
|
37
38
|
<div class="d-lg-none small text-muted mt-1"><%= t "good_job.models.cron.next_scheduled" %></div>
|
38
39
|
<%= relative_time cron_entry.next_at %>
|
39
40
|
</div>
|
40
|
-
<div class="col-6 col-lg-
|
41
|
+
<div class="col-6 col-lg-1 text-wrap small">
|
41
42
|
<% if cron_entry.last_job.present? %>
|
42
43
|
<div class="d-lg-none small text-muted mt-1"><%= t "good_job.models.cron.last_run" %></div>
|
43
44
|
<%= link_to relative_time(cron_entry.last_job_at), cron_entry_path(cron_entry), title: "Job #{cron_entry.last_job.id}" %>
|
44
45
|
<% end %>
|
45
46
|
</div>
|
46
|
-
<div class="col
|
47
|
+
<div class="col-6 col-lg-1 text-wrap small">
|
48
|
+
<div class="d-lg-none small text-muted mt-1"><%= t "good_job.models.cron.status" %></div>
|
49
|
+
<% if cron_entry.enabled? %>
|
50
|
+
<span class="text-success"><%= t "good_job.models.cron.states.active" %></span>
|
51
|
+
<% else %>
|
52
|
+
<span class="text-muted"><%= t "good_job.models.cron.states.paused" %></span>
|
53
|
+
<% end %>
|
54
|
+
</div>
|
55
|
+
<div class="col-lg-2 d-flex gap-3 justify-content-end">
|
47
56
|
<%= button_to enqueue_cron_entry_path(cron_entry), method: :post, class: "btn btn-sm btn-outline-primary", form_class: "d-inline-block", aria: { label: t("good_job.cron_entries.actions.enqueue") }, title: t("good_job.cron_entries.actions.enqueue"), data: { confirm: t("good_job.cron_entries.actions.confirm_enqueue") } do %>
|
48
57
|
<%= render_icon "skip_forward" %>
|
49
58
|
<% end %>
|
@@ -1,4 +1,4 @@
|
|
1
|
-
<nav class="navbar p-1 shadow-sm
|
1
|
+
<nav class="navbar p-1 shadow-sm border-bottom text-muted small" id="secondary-navbar" data-live-poll-region="secondary-navbar">
|
2
2
|
<div class="container-fluid">
|
3
3
|
<div class="flex-fill d-none d-sm-block ">
|
4
4
|
<%= t(".inspiration") %>
|
@@ -1,25 +1,21 @@
|
|
1
1
|
<!DOCTYPE html>
|
2
2
|
<html lang="<%= I18n.locale %>" data-bs-theme="auto">
|
3
3
|
<head>
|
4
|
-
<title>Good Job Dashboard</title>
|
5
4
|
<meta charset="utf-8">
|
6
5
|
<meta content="width=device-width, initial-scale=1, shrink-to-fit=no" name="viewport">
|
7
|
-
<link rel="icon" href="data:image/svg+xml,<svg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%2210 0 100 100%22><text y=%22.90em%22 font-size=%2290%22>👍</text></svg>">
|
8
|
-
<%= csrf_meta_tags %>
|
9
|
-
<%= csp_meta_tag %>
|
10
6
|
|
11
7
|
<%# Bootstrap Color Modes
|
12
8
|
"It is suggested to include the JavaScript at the top of your page
|
13
9
|
to reduce potential screen flickering during reloading of your site."
|
14
10
|
https://getbootstrap.com/docs/5.3/customize/color-modes/#javascript
|
15
11
|
%>
|
16
|
-
|
12
|
+
<script nonce="<%= content_security_policy_nonce %>">
|
17
13
|
let theme = localStorage.getItem('good_job-theme');
|
18
14
|
if (!["light", "dark"].includes(theme)) {
|
19
15
|
theme = window.matchMedia('(prefers-color-scheme: dark)').matches ? 'dark' : 'light';
|
20
16
|
}
|
21
17
|
document.documentElement.setAttribute('data-bs-theme', theme);
|
22
|
-
|
18
|
+
</script>
|
23
19
|
|
24
20
|
<%# Do not use asset tag helpers to avoid paths being overriden by config.asset_host %>
|
25
21
|
<%= tag.link rel: "stylesheet", href: frontend_static_path(:bootstrap, format: :css, locale: nil), nonce: content_security_policy_nonce %>
|
@@ -31,6 +27,11 @@
|
|
31
27
|
<% importmaps = GoodJob::FrontendsController.js_modules.keys.index_with { |module_name| frontend_module_path(module_name, format: :js, locale: nil) } %>
|
32
28
|
<%= tag.script({ imports: importmaps }.to_json.html_safe, type: "importmap", nonce: content_security_policy_nonce) %>
|
33
29
|
<%= tag.script "", type: "module", nonce: content_security_policy_nonce do %> import "application"; <% end %>
|
30
|
+
|
31
|
+
<title>Good Job Dashboard</title>
|
32
|
+
<%= tag.link rel: "icon", href: 'data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="10 0 100 100"><text y=".90em" font-size="90">👍</text></svg>' %>
|
33
|
+
<%= csrf_meta_tags %>
|
34
|
+
<%= csp_meta_tag %>
|
34
35
|
</head>
|
35
36
|
<body>
|
36
37
|
<div class="d-flex flex-column min-vh-100">
|
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/exe/good_job
CHANGED
@@ -92,6 +92,7 @@ class CreateGoodJobs < ActiveRecord::Migration<%= migration_version %>
|
|
92
92
|
where: "finished_at IS NULL", name: :index_good_job_jobs_for_candidate_lookup
|
93
93
|
add_index :good_jobs, [:batch_id], where: "batch_id IS NOT NULL"
|
94
94
|
add_index :good_jobs, [:batch_callback_id], where: "batch_callback_id IS NOT NULL"
|
95
|
+
add_index :good_jobs, :job_class, name: :index_good_jobs_on_job_class
|
95
96
|
add_index :good_jobs, :labels, using: :gin, where: "(labels IS NOT NULL)", name: :index_good_jobs_on_labels
|
96
97
|
|
97
98
|
add_index :good_job_executions, [:active_job_id, :created_at], name: :index_good_job_executions_on_active_job_id_and_created_at
|
data/lib/generators/good_job/templates/update/migrations/04_add_index_good_jobs_job_class.rb.erb
ADDED
@@ -0,0 +1,17 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
class AddIndexGoodJobsJobClass < ActiveRecord::Migration<%= migration_version %>
|
4
|
+
disable_ddl_transaction!
|
5
|
+
|
6
|
+
def change
|
7
|
+
reversible do |dir|
|
8
|
+
dir.up do
|
9
|
+
# Ensure this incremental update migration is idempotent
|
10
|
+
# with monolithic install migration.
|
11
|
+
return if connection.index_exists? :good_jobs, :job_class
|
12
|
+
end
|
13
|
+
end
|
14
|
+
|
15
|
+
add_index :good_jobs, :job_class, algorithm: :concurrently
|
16
|
+
end
|
17
|
+
end
|
data/lib/good_job/cli.rb
CHANGED
@@ -29,10 +29,15 @@ module GoodJob
|
|
29
29
|
attr_accessor :within_exe
|
30
30
|
alias within_exe? within_exe
|
31
31
|
|
32
|
-
# Whether
|
32
|
+
# Whether the CLI's default logger should log to STDOUT.
|
33
33
|
# @return [Boolean, nil]
|
34
34
|
attr_accessor :log_to_stdout
|
35
|
-
|
35
|
+
|
36
|
+
# Whether the CLI's default logger logs to STDOUT.
|
37
|
+
# @return [Boolean, nil]
|
38
|
+
def log_to_stdout?
|
39
|
+
GoodJob::CLI.log_to_stdout.nil? ? GoodJob::CLI.within_exe? : GoodJob::CLI.log_to_stdout
|
40
|
+
end
|
36
41
|
|
37
42
|
# @!visibility private
|
38
43
|
def exit_on_failure?
|
data/lib/good_job/version.rb
CHANGED
data/lib/good_job.rb
CHANGED
@@ -290,7 +290,7 @@ module GoodJob
|
|
290
290
|
# For use in tests/CI to validate GoodJob is up-to-date.
|
291
291
|
# @return [Boolean]
|
292
292
|
def self.migrated?
|
293
|
-
GoodJob::Job.
|
293
|
+
GoodJob::Job.job_class_index_migrated?
|
294
294
|
end
|
295
295
|
|
296
296
|
# Pause job execution for a given queue or job class.
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: good_job
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 4.
|
4
|
+
version: 4.12.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ben Sheldon
|
@@ -349,6 +349,7 @@ files:
|
|
349
349
|
- lib/generators/good_job/templates/update/migrations/01_create_good_jobs.rb.erb
|
350
350
|
- lib/generators/good_job/templates/update/migrations/02_add_jobs_finished_at_to_good_job_batches.rb.erb
|
351
351
|
- lib/generators/good_job/templates/update/migrations/03_add_index_good_jobs_concurrency_key_created_at.rb.erb
|
352
|
+
- lib/generators/good_job/templates/update/migrations/04_add_index_good_jobs_job_class.rb.erb
|
352
353
|
- lib/generators/good_job/update_generator.rb
|
353
354
|
- lib/good_job.rb
|
354
355
|
- lib/good_job/active_job_extensions/batches.rb
|
@@ -421,7 +422,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
421
422
|
- !ruby/object:Gem::Version
|
422
423
|
version: '0'
|
423
424
|
requirements: []
|
424
|
-
rubygems_version: 3.
|
425
|
+
rubygems_version: 3.7.2
|
425
426
|
specification_version: 4
|
426
427
|
summary: A multithreaded, Postgres-based ActiveJob backend for Ruby on Rails
|
427
428
|
test_files: []
|