good_job 4.24.0 → 4.24.2
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 +50 -0
- data/README.md +5 -1
- data/app/charts/good_job/performance_index_chart.rb +1 -1
- data/app/charts/good_job/scheduled_by_queue_chart.rb +1 -1
- data/app/controllers/good_job/metrics_controller.rb +3 -1
- data/app/frontend/good_job/modules/theme_controller.js +42 -28
- data/app/models/good_job/batch.rb +1 -0
- data/app/models/good_job/i18n_config.rb +10 -0
- data/app/models/good_job/job.rb +37 -31
- data/app/views/good_job/shared/_navbar.erb +10 -24
- data/app/views/layouts/good_job/application.html.erb +1 -1
- data/config/brakeman.ignore +3 -3
- data/config/locales/az.yml +2 -4
- data/config/locales/de.yml +2 -4
- data/config/locales/en.yml +2 -4
- data/config/locales/es.yml +2 -4
- data/config/locales/fr.yml +4 -6
- data/config/locales/it.yml +2 -4
- data/config/locales/ja.yml +2 -4
- data/config/locales/ko.yml +2 -4
- data/config/locales/nl.yml +2 -4
- data/config/locales/pt-BR.yml +2 -4
- data/config/locales/ru.yml +2 -4
- data/config/locales/tr.yml +2 -4
- data/config/locales/uk.yml +2 -4
- data/config/locales/zh-CN.yml +2 -4
- data/lib/good_job/active_job_extensions/batches.rb +5 -1
- data/lib/good_job/active_job_extensions/interrupt_errors.rb +3 -2
- data/lib/good_job/bulk.rb +1 -0
- data/lib/good_job/configuration.rb +14 -0
- data/lib/good_job/engine.rb +2 -0
- data/lib/good_job/log_subscriber.rb +9 -0
- data/lib/good_job/version.rb +1 -1
- metadata +495 -459
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: c553e4de2b10775ca7edfc1a4dd2b968ecf8da8ddced5fbfd2209565221a6b80
|
|
4
|
+
data.tar.gz: b787c9a01e2931cf76a8c02a844296e4f64bf9ee9b2e5c3e5ee55f31bd136f2f
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: e9694d009e5a252e24dbd55224b865f7a148657f73de3c375fc64b5feb75ef4feff6b56ecbbcb3a5587f8cc8e9b6c18aedc8d827253bb79029ef8e95c94516e6
|
|
7
|
+
data.tar.gz: fe9fbf80a3cf05cfc6a0ba5a5e8c6ee2cf80c2b655f3542c91e7d58ab2b29124f44ae9288d78d33f1d1bbc586b395a7d24c3052f993478a370190447d34f81c1
|
data/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,55 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [v4.24.2](https://github.com/bensheldon/good_job/tree/v4.24.2) (2026-12-06)
|
|
4
|
+
|
|
5
|
+
[Full Changelog](https://github.com/bensheldon/good_job/compare/v4.24.1...v4.24.2)
|
|
6
|
+
|
|
7
|
+
**Implemented enhancements:**
|
|
8
|
+
|
|
9
|
+
- Replace theme dropdown with a single light/dark toggle [\#1933](https://github.com/bensheldon/good_job/pull/1933) ([bensheldon](https://github.com/bensheldon))
|
|
10
|
+
|
|
11
|
+
**Fixed bugs:**
|
|
12
|
+
|
|
13
|
+
- Fix `job.batch` to be available in job retention callbacks [\#1925](https://github.com/bensheldon/good_job/pull/1925) ([eidam](https://github.com/eidam))
|
|
14
|
+
|
|
15
|
+
**Closed issues:**
|
|
16
|
+
|
|
17
|
+
- Expose the Good Job record to preserve\_job\_records callbacks [\#1924](https://github.com/bensheldon/good_job/issues/1924)
|
|
18
|
+
- Dashboard appears to be overwriting `I18n.available_locales` [\#1916](https://github.com/bensheldon/good_job/issues/1916)
|
|
19
|
+
- Incompatibility between bulk enqueue and concurrency [\#1693](https://github.com/bensheldon/good_job/issues/1693)
|
|
20
|
+
|
|
21
|
+
**Merged pull requests:**
|
|
22
|
+
|
|
23
|
+
- Schedule Dependabot with an explicit cron [\#1931](https://github.com/bensheldon/good_job/pull/1931) ([bensheldon](https://github.com/bensheldon))
|
|
24
|
+
- Group all Dependabot updates into a single PR [\#1930](https://github.com/bensheldon/good_job/pull/1930) ([bensheldon](https://github.com/bensheldon))
|
|
25
|
+
- Bump github/codeql-action from 4.39.3 to 4.39.5 [\#1929](https://github.com/bensheldon/good_job/pull/1929) ([dependabot[bot]](https://github.com/apps/dependabot))
|
|
26
|
+
- Add README note about queue-ordering \(+\) performance problems [\#1926](https://github.com/bensheldon/good_job/pull/1926) ([yppp](https://github.com/yppp))
|
|
27
|
+
- Deprecate unset dequeue\_query\_sort; scheduled\_at ordering coming in v5 [\#1923](https://github.com/bensheldon/good_job/pull/1923) ([bensheldon](https://github.com/bensheldon))
|
|
28
|
+
- Keep Dashboard locale writes from leaking into the application's I18n config [\#1922](https://github.com/bensheldon/good_job/pull/1922) ([theluckystrike](https://github.com/theluckystrike))
|
|
29
|
+
- Log when bulk enqueue falls back to enqueuing jobs individually [\#1921](https://github.com/bensheldon/good_job/pull/1921) ([rafayqayyum](https://github.com/rafayqayyum))
|
|
30
|
+
- Update all dependencies [\#1920](https://github.com/bensheldon/good_job/pull/1920) ([bensheldon](https://github.com/bensheldon))
|
|
31
|
+
- Update dependencies to resolve Dependabot security alerts [\#1919](https://github.com/bensheldon/good_job/pull/1919) ([bensheldon](https://github.com/bensheldon))
|
|
32
|
+
- Fix French about\_x\_months showing hours instead of months [\#1917](https://github.com/bensheldon/good_job/pull/1917) ([owgreen-dev](https://github.com/owgreen-dev))
|
|
33
|
+
- Follow the system theme by default and sync the theme across tabs [\#1915](https://github.com/bensheldon/good_job/pull/1915) ([janko](https://github.com/janko))
|
|
34
|
+
|
|
35
|
+
## [v4.24.1](https://github.com/bensheldon/good_job/tree/v4.24.1) (2026-11-03)
|
|
36
|
+
|
|
37
|
+
[Full Changelog](https://github.com/bensheldon/good_job/compare/v4.24.0...v4.24.1)
|
|
38
|
+
|
|
39
|
+
**Fixed bugs:**
|
|
40
|
+
|
|
41
|
+
- Look up cron settings once, not per entry, in the primary nav \(36 ms → 0.75 ms at 100 entries\) [\#1906](https://github.com/bensheldon/good_job/pull/1906) ([czj](https://github.com/czj))
|
|
42
|
+
- Sort dashboard chart legends alphabetically [\#1903](https://github.com/bensheldon/good_job/pull/1903) ([6temes](https://github.com/6temes))
|
|
43
|
+
|
|
44
|
+
**Closed issues:**
|
|
45
|
+
|
|
46
|
+
- Unique constraint violation messages in postgres error logs [\#1536](https://github.com/bensheldon/good_job/issues/1536)
|
|
47
|
+
|
|
48
|
+
**Merged pull requests:**
|
|
49
|
+
|
|
50
|
+
- Document expected duplicate key errors from cron in Postgres logs [\#1908](https://github.com/bensheldon/good_job/pull/1908) ([rafayqayyum](https://github.com/rafayqayyum))
|
|
51
|
+
- Bump github/codeql-action from 4.38.2 to 4.39.1 [\#1907](https://github.com/bensheldon/good_job/pull/1907) ([dependabot[bot]](https://github.com/apps/dependabot))
|
|
52
|
+
|
|
3
53
|
## [v4.24.0](https://github.com/bensheldon/good_job/tree/v4.24.0) (2026-10-29)
|
|
4
54
|
|
|
5
55
|
[Full Changelog](https://github.com/bensheldon/good_job/compare/v4.23.1...v4.24.0)
|
data/README.md
CHANGED
|
@@ -344,7 +344,7 @@ Available configuration options are:
|
|
|
344
344
|
```
|
|
345
345
|
|
|
346
346
|
- `enable_pauses` (boolean) whether job processing can be paused. Defaults to `false`. You can also set this with the environment variable `GOOD_JOB_ENABLE_PAUSES`.
|
|
347
|
-
- `dequeue_query_sort` (symbol) sets the sort order used when querying for the next job(s) to execute. Defaults to `:created_at`. It can be any one of:
|
|
347
|
+
- `dequeue_query_sort` (symbol) sets the sort order used when querying for the next job(s) to execute. Defaults to `:created_at`. **Leaving this unset is deprecated**: set `config.good_job.dequeue_query_sort = :scheduled_at` to opt in to the next major version's behavior (setting any value silences the deprecation warning). It can be any one of:
|
|
348
348
|
- `:created_at` sorts by priority, then job creation order. This is the default, but no longer best matches GoodJob's contemporary data model.
|
|
349
349
|
- `:scheduled_at` sorts by priority, then `scheduled_at`, then `id`, which better matches GoodJob's contemporary data model. This will become the default/only behavior in a future major release.
|
|
350
350
|
|
|
@@ -805,6 +805,8 @@ GoodJob can enqueue Active Job jobs on a recurring basis that can be used as a r
|
|
|
805
805
|
|
|
806
806
|
Cron-style jobs can be enequeued by any GoodJob process (e.g., CLI or `:async` execution mode) that has `config.good_job.enable_cron` set to `true`. Enabling cron on multiple processes will not enqueue duplicate jobs; GoodJob's cron uses unique indexes to ensure that only a single job is enqueued for a given time interval. In order for this to work, GoodJob must preserve cron-created job records; these records will be automatically deleted like any other preserved record.
|
|
807
807
|
|
|
808
|
+
When cron is enabled on multiple processes, each process attempts to enqueue every scheduled job and all but one of the inserts fail on the unique index. GoodJob rescues these failures, but PostgreSQL still writes them to its own log as `duplicate key value violates unique constraint "index_good_jobs_on_cron_key_and_cron_at_cond"`. These errors are expected and harmless. If they are too noisy, enable cron on a single process instead, at the cost of no redundancy if that process stops.
|
|
809
|
+
|
|
808
810
|
Cron-format is parsed by the [`fugit`](https://github.com/floraison/fugit) gem, which has support for seconds-level resolution (e.g. `* * * * * *`) and natural language parsing (e.g. `every second`).
|
|
809
811
|
|
|
810
812
|
If you use the [Dashboard](#dashboard) the scheduled tasks can be viewed in the 'cron' menu. In this view you can also disable a task or run/enqueue a task immediately.
|
|
@@ -1314,6 +1316,8 @@ By default, GoodJob creates a single thread execution pool that will execute job
|
|
|
1314
1316
|
bundle exec good_job --queues="+transactional_messages,batch_processing"
|
|
1315
1317
|
```
|
|
1316
1318
|
|
|
1319
|
+
Note: queue-ordering with `+` can have performance problems due to index ordering (see #1094 and #1091).
|
|
1320
|
+
|
|
1317
1321
|
Configuration can be injected by environment variables too:
|
|
1318
1322
|
|
|
1319
1323
|
```bash
|
|
@@ -49,7 +49,7 @@ module GoodJob
|
|
|
49
49
|
|
|
50
50
|
executions_data = GoodJob::Job.connection_pool.with_connection { |conn| conn.exec_query(GoodJob::Job.pg_or_jdbc_query(sum_query), "GoodJob Performance Chart", binds) }
|
|
51
51
|
|
|
52
|
-
job_names = executions_data.reject { |d| d['value'].nil? }.map { |d| d['job_class'] || BaseFilter::EMPTY }.uniq
|
|
52
|
+
job_names = executions_data.reject { |d| d['value'].nil? }.map { |d| d['job_class'] || BaseFilter::EMPTY }.uniq.sort
|
|
53
53
|
timestamp_values = []
|
|
54
54
|
timestamps = []
|
|
55
55
|
jobs_data = executions_data.to_a.group_by { |d| d['timestamp'] }.each_with_object({}) do |(timestamp, values), hash|
|
|
@@ -48,7 +48,7 @@ module GoodJob
|
|
|
48
48
|
|
|
49
49
|
executions_data = GoodJob::Job.connection_pool.with_connection { |conn| conn.exec_query(GoodJob::Job.pg_or_jdbc_query(count_query), "GoodJob Dashboard Chart", binds) }
|
|
50
50
|
|
|
51
|
-
queue_names = executions_data.reject { |d| d['count'].nil? }.map { |d| d['queue_name'] || BaseFilter::EMPTY }.uniq
|
|
51
|
+
queue_names = executions_data.reject { |d| d['count'].nil? }.map { |d| d['queue_name'] || BaseFilter::EMPTY }.uniq.sort
|
|
52
52
|
labels = []
|
|
53
53
|
queues_data = executions_data.to_a.group_by { |d| d['timestamp'] }.each_with_object({}) do |(timestamp, values), hash|
|
|
54
54
|
labels << timestamp.in_time_zone.strftime('%H:%M')
|
|
@@ -8,7 +8,9 @@ module GoodJob
|
|
|
8
8
|
batches_count = GoodJob::BatchRecord.all.size
|
|
9
9
|
cron_entries = GoodJob::CronEntry.all
|
|
10
10
|
cron_entries_count = cron_entries.size
|
|
11
|
-
cron_entries_enabled_count =
|
|
11
|
+
cron_entries_enabled_count = GoodJob::Setting.cron_keys_enabled(
|
|
12
|
+
cron_entries.map { |entry| [entry.key, entry.enabled_by_default?] }
|
|
13
|
+
).values.count(true)
|
|
12
14
|
cron_entries_paused_count = cron_entries_count - cron_entries_enabled_count
|
|
13
15
|
pauses_count = GoodJob::Setting.paused.values.sum(&:count)
|
|
14
16
|
processes_count = GoodJob::Process.active.count
|
|
@@ -1,44 +1,58 @@
|
|
|
1
|
-
// hello_controller.js
|
|
2
1
|
import { Controller } from "stimulus"
|
|
2
|
+
|
|
3
|
+
// A single dark mode toggle. The page follows the system theme unless the
|
|
4
|
+
// user picks the other one; picking the theme the system already uses
|
|
5
|
+
// clears the override and returns to following the system.
|
|
6
|
+
// https://lea.verou.me/blog/2026/dark-mode-toggles/
|
|
3
7
|
export default class extends Controller {
|
|
4
|
-
static targets = [ "
|
|
8
|
+
static targets = [ "button" ]
|
|
5
9
|
|
|
6
10
|
connect() {
|
|
7
|
-
window.matchMedia('(prefers-color-scheme: dark)')
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
this.
|
|
11
|
+
this.systemQuery = window.matchMedia('(prefers-color-scheme: dark)');
|
|
12
|
+
this.systemChanged = () => this.render();
|
|
13
|
+
this.systemQuery.addEventListener('change', this.systemChanged);
|
|
14
|
+
this.render();
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
disconnect() {
|
|
18
|
+
this.systemQuery.removeEventListener('change', this.systemChanged);
|
|
15
19
|
}
|
|
16
20
|
|
|
17
|
-
|
|
18
|
-
const theme =
|
|
19
|
-
|
|
20
|
-
|
|
21
|
+
toggle() {
|
|
22
|
+
const theme = this.currentTheme() === 'dark' ? 'light' : 'dark';
|
|
23
|
+
if (theme === this.systemTheme()) {
|
|
24
|
+
localStorage.removeItem('good_job-theme');
|
|
25
|
+
} else {
|
|
26
|
+
localStorage.setItem('good_job-theme', theme);
|
|
27
|
+
}
|
|
28
|
+
this.render();
|
|
21
29
|
}
|
|
22
30
|
|
|
23
|
-
|
|
24
|
-
|
|
31
|
+
// Follows a theme chosen in another tab.
|
|
32
|
+
sync(event) {
|
|
33
|
+
if (event.key === 'good_job-theme' || event.key === null) {
|
|
34
|
+
this.render();
|
|
35
|
+
}
|
|
36
|
+
}
|
|
25
37
|
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
button.classList.add('active');
|
|
30
|
-
}
|
|
31
|
-
});
|
|
38
|
+
render() {
|
|
39
|
+
const theme = this.currentTheme();
|
|
40
|
+
document.documentElement.setAttribute('data-bs-theme', theme);
|
|
32
41
|
|
|
33
|
-
const
|
|
34
|
-
|
|
42
|
+
const dark = theme === 'dark';
|
|
43
|
+
// The button names the mode it switches to.
|
|
44
|
+
this.buttonTarget.querySelector('.theme-to-dark').classList.toggle('d-none', dark);
|
|
45
|
+
this.buttonTarget.querySelector('.theme-to-light').classList.toggle('d-none', !dark);
|
|
35
46
|
}
|
|
36
47
|
|
|
37
|
-
|
|
38
|
-
|
|
48
|
+
// Matches the layout's inline script, which follows the system unless
|
|
49
|
+
// light or dark is stored.
|
|
50
|
+
currentTheme() {
|
|
51
|
+
const theme = localStorage.getItem('good_job-theme');
|
|
52
|
+
return ["light", "dark"].includes(theme) ? theme : this.systemTheme();
|
|
39
53
|
}
|
|
40
54
|
|
|
41
|
-
|
|
42
|
-
return
|
|
55
|
+
systemTheme() {
|
|
56
|
+
return this.systemQuery.matches ? 'dark' : 'light';
|
|
43
57
|
}
|
|
44
58
|
}
|
|
@@ -147,6 +147,7 @@ module GoodJob
|
|
|
147
147
|
end
|
|
148
148
|
|
|
149
149
|
# Phase 5: Enqueue concurrency-limited jobs individually
|
|
150
|
+
ActiveSupport::Notifications.instrument("enqueue_jobs_individually.good_job", { jobs: build_result[:unbulkable].map { |entry| entry[:active_job] } }) if build_result[:unbulkable].any?
|
|
150
151
|
build_result[:unbulkable].each do |entry|
|
|
151
152
|
within_thread(batch_id: entry[:batch].id) do
|
|
152
153
|
entry[:active_job].enqueue
|
|
@@ -22,5 +22,15 @@ module GoodJob
|
|
|
22
22
|
def default_locale
|
|
23
23
|
GoodJob.configuration.dashboard_default_locale
|
|
24
24
|
end
|
|
25
|
+
|
|
26
|
+
# I18n::Config stores these settings in class variables, which are shared with the
|
|
27
|
+
# application's I18n config. Ignore writes made while the Dashboard is rendering
|
|
28
|
+
# (e.g. a gem lazily running `I18n.available_locales |= [...]`) so they don't
|
|
29
|
+
# replace the application's settings with the Dashboard's.
|
|
30
|
+
def available_locales=(_locales)
|
|
31
|
+
end
|
|
32
|
+
|
|
33
|
+
def default_locale=(_locale)
|
|
34
|
+
end
|
|
25
35
|
end
|
|
26
36
|
end
|
data/app/models/good_job/job.rb
CHANGED
|
@@ -782,7 +782,7 @@ module GoodJob
|
|
|
782
782
|
|
|
783
783
|
job_performed_at = Time.current
|
|
784
784
|
monotonic_start = ::Process.clock_gettime(::Process::CLOCK_MONOTONIC)
|
|
785
|
-
execution, result = GoodJob::CurrentThread.within do |current_thread|
|
|
785
|
+
execution, result, preserve = GoodJob::CurrentThread.within do |current_thread|
|
|
786
786
|
current_thread.reset
|
|
787
787
|
current_thread.job = self
|
|
788
788
|
|
|
@@ -804,7 +804,7 @@ module GoodJob
|
|
|
804
804
|
executions.where(finished_at: nil).where.not(performed_at: nil).update_all(interrupted_execution_attrs) # rubocop:disable Rails/SkipsModelValidations
|
|
805
805
|
end
|
|
806
806
|
|
|
807
|
-
|
|
807
|
+
execution = transaction do
|
|
808
808
|
execution_attrs = {
|
|
809
809
|
job_class: job_class,
|
|
810
810
|
queue_name: queue_name,
|
|
@@ -828,7 +828,7 @@ module GoodJob
|
|
|
828
828
|
created_execution
|
|
829
829
|
end
|
|
830
830
|
|
|
831
|
-
|
|
831
|
+
result = ActiveSupport::Notifications.instrument("perform_job.good_job", { job: self, execution: execution, process_id: current_thread.process_id, thread_name: current_thread.thread_name }) do |instrument_payload|
|
|
832
832
|
value = ActiveJob::Base.execute(active_job_data)
|
|
833
833
|
active_job = current_thread.active_job
|
|
834
834
|
|
|
@@ -875,43 +875,49 @@ module GoodJob
|
|
|
875
875
|
ExecutionResult.new(value: nil, active_job: active_job, unhandled_error: e, error_event: error_event)
|
|
876
876
|
end
|
|
877
877
|
|
|
878
|
-
|
|
879
|
-
|
|
878
|
+
job_attributes = { locked_by_id: nil, locked_at: nil }
|
|
879
|
+
job_attributes[:lock_type] = nil if self.class.lock_type_column_exists?
|
|
880
880
|
|
|
881
|
-
|
|
882
|
-
|
|
881
|
+
job_error = result.handled_error || result.unhandled_error
|
|
882
|
+
if job_error
|
|
883
|
+
error_string = self.class.format_error(job_error)
|
|
883
884
|
|
|
884
|
-
|
|
885
|
-
|
|
886
|
-
error_string = self.class.format_error(job_error)
|
|
885
|
+
job_attributes[:error] = error_string
|
|
886
|
+
job_attributes[:error_event] = result.error_event
|
|
887
887
|
|
|
888
|
-
|
|
889
|
-
|
|
888
|
+
execution.error = error_string
|
|
889
|
+
execution.error_event = result.error_event
|
|
890
|
+
execution.error_backtrace = job_error.backtrace
|
|
891
|
+
else
|
|
892
|
+
job_attributes[:error] = nil
|
|
893
|
+
job_attributes[:error_event] = nil
|
|
894
|
+
end
|
|
890
895
|
|
|
891
|
-
|
|
892
|
-
|
|
893
|
-
|
|
894
|
-
|
|
895
|
-
|
|
896
|
-
|
|
897
|
-
end
|
|
896
|
+
job_finished_at = Time.current
|
|
897
|
+
monotonic_duration = (::Process.clock_gettime(::Process::CLOCK_MONOTONIC) - monotonic_start).seconds
|
|
898
|
+
job_attributes[:finished_at] = job_finished_at
|
|
899
|
+
|
|
900
|
+
execution.finished_at = job_finished_at
|
|
901
|
+
execution.duration = monotonic_duration
|
|
898
902
|
|
|
899
|
-
|
|
900
|
-
|
|
901
|
-
|
|
903
|
+
retry_unhandled_error = result.unhandled_error && GoodJob.retry_on_unhandled_error
|
|
904
|
+
reenqueued = result.retried? || retry_unhandled_error
|
|
905
|
+
if reenqueued
|
|
906
|
+
job_attributes[:performed_at] = nil
|
|
907
|
+
job_attributes[:finished_at] = nil
|
|
908
|
+
end
|
|
902
909
|
|
|
903
|
-
|
|
904
|
-
|
|
910
|
+
# Decide retention while this job is still the current job, so that
|
|
911
|
+
# `job.batch` resolves in a `preserve_job_records` callback.
|
|
912
|
+
# Decide before assigning the completion attributes, so that a callback
|
|
913
|
+
# that adds the job to a batch cannot persist its completion early.
|
|
914
|
+
preserve = reenqueued || cron_key.present? || preserve_job_record?(result)
|
|
915
|
+
assign_attributes(job_attributes)
|
|
905
916
|
|
|
906
|
-
|
|
907
|
-
reenqueued = result.retried? || retry_unhandled_error
|
|
908
|
-
if reenqueued
|
|
909
|
-
job_attributes[:performed_at] = nil
|
|
910
|
-
job_attributes[:finished_at] = nil
|
|
917
|
+
[execution, result, preserve]
|
|
911
918
|
end
|
|
912
919
|
|
|
913
|
-
|
|
914
|
-
if finished_at.blank? || cron_key.present? || preserve_job_record?(result)
|
|
920
|
+
if preserve
|
|
915
921
|
transaction do
|
|
916
922
|
execution.save!
|
|
917
923
|
save!
|
|
@@ -105,31 +105,17 @@
|
|
|
105
105
|
<hr class="d-lg-none my-2 text-secondary">
|
|
106
106
|
</li>
|
|
107
107
|
|
|
108
|
-
<li class="nav-item
|
|
109
|
-
<button class="nav-link
|
|
110
|
-
|
|
111
|
-
|
|
108
|
+
<li class="nav-item" data-controller="theme" data-action="storage@window->theme#sync">
|
|
109
|
+
<button type="button" class="nav-link" data-theme-target="button" data-action="theme#toggle">
|
|
110
|
+
<span class="theme-to-dark" title="<%= t(".theme.dark") %>">
|
|
111
|
+
<%= render_icon "moon_stars_fill", "aria-hidden": true %>
|
|
112
|
+
<span class="visually-hidden"><%= t(".theme.dark") %></span>
|
|
113
|
+
</span>
|
|
114
|
+
<span class="theme-to-light d-none" title="<%= t(".theme.light") %>">
|
|
115
|
+
<%= render_icon "sun_fill", "aria-hidden": true %>
|
|
116
|
+
<span class="visually-hidden"><%= t(".theme.light") %></span>
|
|
117
|
+
</span>
|
|
112
118
|
</button>
|
|
113
|
-
<ul class="dropdown-menu dropdown-menu-end" aria-labelledby="bd-theme-text">
|
|
114
|
-
<li>
|
|
115
|
-
<button type="button" class="dropdown-item" data-theme-target="button" data-theme-value-param="light" data-action="theme#change" aria-pressed="true">
|
|
116
|
-
<%= render_icon "sun_fill" %>
|
|
117
|
-
<%= t(".theme.light") %>
|
|
118
|
-
</button>
|
|
119
|
-
</li>
|
|
120
|
-
<li>
|
|
121
|
-
<button type="button" class="dropdown-item" data-theme-target="button" data-theme-value-param="dark" data-action="theme#change" aria-pressed="false">
|
|
122
|
-
<%= render_icon "moon_stars_fill" %>
|
|
123
|
-
<%= t(".theme.dark") %>
|
|
124
|
-
</button>
|
|
125
|
-
</li>
|
|
126
|
-
<li>
|
|
127
|
-
<button type="button" class="dropdown-item btn btn-link" data-theme-target="button" data-theme-value-param="auto" data-action="theme#change" aria-pressed="false">
|
|
128
|
-
<%= render_icon "circle_half" %>
|
|
129
|
-
<%= t(".theme.auto") %>
|
|
130
|
-
</button>
|
|
131
|
-
</li>
|
|
132
|
-
</ul>
|
|
133
119
|
</li>
|
|
134
120
|
</ul>
|
|
135
121
|
</div>
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<!DOCTYPE html>
|
|
2
|
-
<html lang="<%= I18n.locale %>" data-bs-theme="
|
|
2
|
+
<html lang="<%= I18n.locale %>" data-bs-theme="light" data-turbo-unloaded>
|
|
3
3
|
<head>
|
|
4
4
|
<meta charset="utf-8">
|
|
5
5
|
<meta content="width=device-width, initial-scale=1, shrink-to-fit=no" name="viewport">
|
data/config/brakeman.ignore
CHANGED
|
@@ -49,13 +49,13 @@
|
|
|
49
49
|
{
|
|
50
50
|
"warning_type": "Dangerous Eval",
|
|
51
51
|
"warning_code": 13,
|
|
52
|
-
"fingerprint": "
|
|
52
|
+
"fingerprint": "90ed51eb2ac4dad9a1f531fc7b0407e846208258a4959b301f06495e830e9e5e",
|
|
53
53
|
"check_name": "Evaluation",
|
|
54
54
|
"message": "Dynamic string evaluated as code",
|
|
55
55
|
"file": "lib/good_job/log_subscriber.rb",
|
|
56
|
-
"line":
|
|
56
|
+
"line": 375,
|
|
57
57
|
"link": "https://brakemanscanner.org/docs/warning_types/dangerous_eval/",
|
|
58
|
-
"code": "class_eval(\" def #{level}(progname = nil, tags: [], &block) # def info(progname = nil, tags: [], &block)\\n return unless logger # return unless logger\\n #\\n tag_logger(*tags) do # tag_logger(*tags) do\\n logger.#{level}(progname, &block) # logger.info(progname, &block)\\n end # end\\n end #\\n\", \"lib/good_job/log_subscriber.rb\", (
|
|
58
|
+
"code": "class_eval(\" def #{level}(progname = nil, tags: [], &block) # def info(progname = nil, tags: [], &block)\\n return unless logger # return unless logger\\n #\\n tag_logger(*tags) do # tag_logger(*tags) do\\n logger.#{level}(progname, &block) # logger.info(progname, &block)\\n end # end\\n end #\\n\", \"lib/good_job/log_subscriber.rb\", (375 + 1))",
|
|
59
59
|
"render_path": null,
|
|
60
60
|
"location": {
|
|
61
61
|
"type": "method",
|
data/config/locales/az.yml
CHANGED
|
@@ -326,10 +326,8 @@ az:
|
|
|
326
326
|
performance: Məhsuldarlıq
|
|
327
327
|
processes: Proseslər
|
|
328
328
|
theme:
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
light: Açıq
|
|
332
|
-
theme: Mövzu
|
|
329
|
+
dark: Tünd rejim
|
|
330
|
+
light: Açıq rejim
|
|
333
331
|
pending_migrations: GoodJob üçün icra edilməmiş verilənlər bazası miqrasiyaları var.
|
|
334
332
|
secondary_navbar:
|
|
335
333
|
inspiration: Unutmayın, siz də yaxşı iş görürsünüz!
|
data/config/locales/de.yml
CHANGED
|
@@ -326,10 +326,8 @@ de:
|
|
|
326
326
|
performance: Leistung
|
|
327
327
|
processes: Prozesse
|
|
328
328
|
theme:
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
light: Hell
|
|
332
|
-
theme: Theme
|
|
329
|
+
dark: Dunkelmodus
|
|
330
|
+
light: Hellmodus
|
|
333
331
|
pending_migrations: GoodJob hat ausstehende Datenbankmigrationen.
|
|
334
332
|
secondary_navbar:
|
|
335
333
|
inspiration: Denk daran, auch du machst einen guten Job!
|
data/config/locales/en.yml
CHANGED
|
@@ -326,10 +326,8 @@ en:
|
|
|
326
326
|
performance: Performance
|
|
327
327
|
processes: Processes
|
|
328
328
|
theme:
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
light: Light
|
|
332
|
-
theme: Theme
|
|
329
|
+
dark: Dark mode
|
|
330
|
+
light: Light mode
|
|
333
331
|
pending_migrations: GoodJob has pending database migrations.
|
|
334
332
|
secondary_navbar:
|
|
335
333
|
inspiration: Remember, you're doing a Good Job too!
|
data/config/locales/es.yml
CHANGED
|
@@ -326,10 +326,8 @@ es:
|
|
|
326
326
|
performance: Rendimiento
|
|
327
327
|
processes: Procesos
|
|
328
328
|
theme:
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
light: Luz
|
|
332
|
-
theme: Tema
|
|
329
|
+
dark: Modo oscuro
|
|
330
|
+
light: Modo claro
|
|
333
331
|
pending_migrations: GoodJob tiene migraciones pendientes.
|
|
334
332
|
secondary_navbar:
|
|
335
333
|
inspiration: "¡Recuerda, también tú estás haciendo un buen trabajo!"
|
data/config/locales/fr.yml
CHANGED
|
@@ -79,8 +79,8 @@ fr:
|
|
|
79
79
|
one: environ 1 heure
|
|
80
80
|
other: environ %{count} heures
|
|
81
81
|
about_x_months:
|
|
82
|
-
one: environ 1
|
|
83
|
-
other: environ %{count}
|
|
82
|
+
one: environ 1 mois
|
|
83
|
+
other: environ %{count} mois
|
|
84
84
|
about_x_years:
|
|
85
85
|
one: environ 1 an
|
|
86
86
|
other: environ %{count} ans
|
|
@@ -326,10 +326,8 @@ fr:
|
|
|
326
326
|
performance: Performance
|
|
327
327
|
processes: Processus
|
|
328
328
|
theme:
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
light: Lumière
|
|
332
|
-
theme: Thème
|
|
329
|
+
dark: Mode sombre
|
|
330
|
+
light: Mode clair
|
|
333
331
|
pending_migrations: GoodJob a des migrations de bases de données en attente.
|
|
334
332
|
secondary_navbar:
|
|
335
333
|
inspiration: N'oublie pas, toi aussi tu fais du bon boulot !
|
data/config/locales/it.yml
CHANGED
|
@@ -326,10 +326,8 @@ it:
|
|
|
326
326
|
performance: Prestazione
|
|
327
327
|
processes: Processi
|
|
328
328
|
theme:
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
light: Chiaro
|
|
332
|
-
theme: Tema
|
|
329
|
+
dark: Modalità scura
|
|
330
|
+
light: Modalità chiara
|
|
333
331
|
pending_migrations: GoodJob ha migrazioni del database in sospeso.
|
|
334
332
|
secondary_navbar:
|
|
335
333
|
inspiration: Ricorda, stai facendo anche tu un Buon Lavoro!
|
data/config/locales/ja.yml
CHANGED
|
@@ -326,10 +326,8 @@ ja:
|
|
|
326
326
|
performance: パフォーマンス
|
|
327
327
|
processes: プロセス
|
|
328
328
|
theme:
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
light: ライト
|
|
332
|
-
theme: テーマ
|
|
329
|
+
dark: ダークモード
|
|
330
|
+
light: ライトモード
|
|
333
331
|
pending_migrations: GoodJobに保留中のデータベースマイグレーションがあります。
|
|
334
332
|
secondary_navbar:
|
|
335
333
|
inspiration: 覚えておいてください、あなたも良い仕事をしています!
|
data/config/locales/ko.yml
CHANGED
|
@@ -326,10 +326,8 @@ ko:
|
|
|
326
326
|
performance: 성능
|
|
327
327
|
processes: 프로세스
|
|
328
328
|
theme:
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
light: 밝은
|
|
332
|
-
theme: 테마
|
|
329
|
+
dark: 다크 모드
|
|
330
|
+
light: 라이트 모드
|
|
333
331
|
pending_migrations: GoodJob에 보류 중인 데이터베이스 마이그레이션 작업이 있습니다.
|
|
334
332
|
secondary_navbar:
|
|
335
333
|
inspiration: 기억하세요, 당신도 좋은 일을 하고 있습니다!
|
data/config/locales/nl.yml
CHANGED
|
@@ -326,10 +326,8 @@ nl:
|
|
|
326
326
|
performance: Prestatie
|
|
327
327
|
processes: Processen
|
|
328
328
|
theme:
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
light: Licht
|
|
332
|
-
theme: Thema
|
|
329
|
+
dark: Donkere modus
|
|
330
|
+
light: Lichte modus
|
|
333
331
|
pending_migrations: GoodJob heeft databasemigraties in behandeling.
|
|
334
332
|
secondary_navbar:
|
|
335
333
|
inspiration: 'Onthoud: jij levert ook goed werk!'
|
data/config/locales/pt-BR.yml
CHANGED
|
@@ -328,10 +328,8 @@ pt-BR:
|
|
|
328
328
|
performance: Desempenho
|
|
329
329
|
processes: Processos
|
|
330
330
|
theme:
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
light: Claro
|
|
334
|
-
theme: Tema
|
|
331
|
+
dark: Modo escuro
|
|
332
|
+
light: Modo claro
|
|
335
333
|
pending_migrations: O GoodJob tem migrações pendentes no banco de dados.
|
|
336
334
|
secondary_navbar:
|
|
337
335
|
inspiration: Lembre-se, você também está fazendo um Bom Trabalho!
|
data/config/locales/ru.yml
CHANGED
|
@@ -352,10 +352,8 @@ ru:
|
|
|
352
352
|
performance: Производительность
|
|
353
353
|
processes: Процессы
|
|
354
354
|
theme:
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
light: Светлая
|
|
358
|
-
theme: Тема офрмдления
|
|
355
|
+
dark: Тёмная тема
|
|
356
|
+
light: Светлая тема
|
|
359
357
|
pending_migrations: У GoodJob есть ожидающие миграции базы данных.
|
|
360
358
|
secondary_navbar:
|
|
361
359
|
inspiration: Благодаря вам Good Job становится лучше! Спасибо!
|
data/config/locales/tr.yml
CHANGED
|
@@ -326,10 +326,8 @@ tr:
|
|
|
326
326
|
performance: Verim
|
|
327
327
|
processes: Süreçler
|
|
328
328
|
theme:
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
light: Işık
|
|
332
|
-
theme: Tema
|
|
329
|
+
dark: Karanlık mod
|
|
330
|
+
light: Aydınlık mod
|
|
333
331
|
pending_migrations: GoodJob'ın bekleyen veritabanı güncellemeleri bulunuyor.
|
|
334
332
|
secondary_navbar:
|
|
335
333
|
inspiration: Unutmayın, siz de iyi bir iş yapıyorsunuz!
|
data/config/locales/uk.yml
CHANGED
|
@@ -352,10 +352,8 @@ uk:
|
|
|
352
352
|
performance: Продуктивність
|
|
353
353
|
processes: Процеси
|
|
354
354
|
theme:
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
light: світло
|
|
358
|
-
theme: Тема
|
|
355
|
+
dark: Темна тема
|
|
356
|
+
light: Світла тема
|
|
359
357
|
pending_migrations: GoodJob має невиконані міграції бази даних.
|
|
360
358
|
secondary_navbar:
|
|
361
359
|
inspiration: Пам'ятайте, ви теж робите хорошу роботу!
|
data/config/locales/zh-CN.yml
CHANGED