<%= t ".minimum_duration" %>
<%= format_duration performance.min_duration %>
+
<%= t ".maximum_duration" %>
<%= format_duration performance.max_duration %>
diff --git a/app/views/good_job/shared/_navbar.erb b/app/views/good_job/shared/_navbar.erb
index 5229978c..c5e357bf 100644
--- a/app/views/good_job/shared/_navbar.erb
+++ b/app/views/good_job/shared/_navbar.erb
@@ -40,7 +40,7 @@
<% end %>
- <%= link_to performances_path, class: ["nav-link", ("active" if controller_name == 'performances')] do %>
+ <%= link_to performance_path, class: ["nav-link", ("active" if controller_name == 'performances')] do %>
<%= t(".performances") %>
<% end %>
diff --git a/config/locales/de.yml b/config/locales/de.yml
index 1468af95..80669f7d 100644
--- a/config/locales/de.yml
+++ b/config/locales/de.yml
@@ -197,7 +197,7 @@ de:
trillion: T
unit: ''
performances:
- index:
+ show:
average_duration: Durchschnittliche Dauer
executions: Hinrichtungen
job_class: Berufsklasse
diff --git a/config/locales/en.yml b/config/locales/en.yml
index dd154f7b..b3666352 100644
--- a/config/locales/en.yml
+++ b/config/locales/en.yml
@@ -197,7 +197,7 @@ en:
trillion: T
unit: ''
performances:
- index:
+ show:
average_duration: Average duration
executions: Executions
job_class: Job class
diff --git a/config/locales/es.yml b/config/locales/es.yml
index c6beac00..a295da32 100644
--- a/config/locales/es.yml
+++ b/config/locales/es.yml
@@ -197,7 +197,7 @@ es:
trillion: T
unit: ''
performances:
- index:
+ show:
average_duration: Duración promedio
executions: Ejecuciones
job_class: clase de trabajo
diff --git a/config/locales/fr.yml b/config/locales/fr.yml
index 36e4093a..e932847a 100644
--- a/config/locales/fr.yml
+++ b/config/locales/fr.yml
@@ -197,7 +197,7 @@ fr:
trillion: J
unit: ''
performances:
- index:
+ show:
average_duration: Durée moyenne
executions: Exécutions
job_class: Catégorie d'emplois
diff --git a/config/locales/it.yml b/config/locales/it.yml
index a4cad1a7..d93cbe7f 100644
--- a/config/locales/it.yml
+++ b/config/locales/it.yml
@@ -197,7 +197,7 @@ it:
trillion: T
unit: ''
performances:
- index:
+ show:
average_duration: Durata media
executions: Esecuzioni
job_class: Classe di lavoro
diff --git a/config/locales/ja.yml b/config/locales/ja.yml
index 617c7c09..47a2189c 100644
--- a/config/locales/ja.yml
+++ b/config/locales/ja.yml
@@ -197,7 +197,7 @@ ja:
trillion: T
unit: ''
performances:
- index:
+ show:
average_duration: 平均所要時間
executions: 処刑
job_class: 職種
diff --git a/config/locales/ko.yml b/config/locales/ko.yml
index f6e26778..9a1d2804 100644
--- a/config/locales/ko.yml
+++ b/config/locales/ko.yml
@@ -197,7 +197,7 @@ ko:
trillion: T
unit: ''
performances:
- index:
+ show:
average_duration: 평균 지속 시간
executions: 처형
job_class: 직업군
diff --git a/config/locales/nl.yml b/config/locales/nl.yml
index 4e6d15eb..39d72fc7 100644
--- a/config/locales/nl.yml
+++ b/config/locales/nl.yml
@@ -197,7 +197,7 @@ nl:
trillion: T
unit: ''
performances:
- index:
+ show:
average_duration: Gemiddelde duur
executions: Executies
job_class: Functie klasse
diff --git a/config/locales/pt-BR.yml b/config/locales/pt-BR.yml
index 23fe01b5..a08c997b 100644
--- a/config/locales/pt-BR.yml
+++ b/config/locales/pt-BR.yml
@@ -197,7 +197,7 @@ pt-BR:
trillion: T
unit: ''
performances:
- index:
+ show:
average_duration: Duração média
executions: Execuções
job_class: Classe de trabalho
diff --git a/config/locales/ru.yml b/config/locales/ru.yml
index e945f679..c4fc173f 100644
--- a/config/locales/ru.yml
+++ b/config/locales/ru.yml
@@ -223,7 +223,7 @@ ru:
trillion: Т
unit: ''
performances:
- index:
+ show:
average_duration: Средняя продолжительность
executions: Казни
job_class: Класс работы
diff --git a/config/locales/tr.yml b/config/locales/tr.yml
index 6d348b18..29497591 100644
--- a/config/locales/tr.yml
+++ b/config/locales/tr.yml
@@ -197,7 +197,7 @@ tr:
trillion: Trilyon
unit: ''
performances:
- index:
+ show:
average_duration: Ortalama süre
executions: İnfazlar
job_class: İş sınıfı
diff --git a/config/locales/uk.yml b/config/locales/uk.yml
index dd9f3704..ac0b22f9 100644
--- a/config/locales/uk.yml
+++ b/config/locales/uk.yml
@@ -223,7 +223,7 @@ uk:
trillion: Трлн
unit: ''
performances:
- index:
+ show:
average_duration: Середня тривалість
executions: Страти
job_class: Клас роботи
diff --git a/config/routes.rb b/config/routes.rb
index 13ef5939..ef63ca6b 100644
--- a/config/routes.rb
+++ b/config/routes.rb
@@ -31,7 +31,7 @@
resources :processes, only: %i[index]
- resources :performances, only: %i[index]
+ resource :performance, only: %i[show]
scope :frontend, controller: :frontends do
get "modules/:name", action: :module, as: :frontend_module, constraints: { format: 'js' }
diff --git a/lib/good_job.rb b/lib/good_job.rb
index 95016d74..fa9ca628 100644
--- a/lib/good_job.rb
+++ b/lib/good_job.rb
@@ -287,7 +287,7 @@ def self.deprecator
def self.migrated?
# Always update with the most recent migration check
GoodJob::DiscreteExecution.reset_column_information
- GoodJob::DiscreteExecution.monotonic_duration_migrated?
+ GoodJob::DiscreteExecution.duration_interval_migrated?
end
ActiveSupport.run_load_hooks(:good_job, self)
diff --git a/spec/app/controllers/good_job/performances_controller_spec.rb b/spec/app/controllers/good_job/performances_controller_spec.rb
index 48aa6a32..122e139e 100644
--- a/spec/app/controllers/good_job/performances_controller_spec.rb
+++ b/spec/app/controllers/good_job/performances_controller_spec.rb
@@ -14,7 +14,7 @@
describe '#index' do
it 'renders the index page' do
- get :index
+ get :show
expect(response).to have_http_status(:ok)
expect(response.body).to include('Performance')
end
diff --git a/spec/app/models/good_job/execution_spec.rb b/spec/app/models/good_job/execution_spec.rb
index 9853156c..0699d427 100644
--- a/spec/app/models/good_job/execution_spec.rb
+++ b/spec/app/models/good_job/execution_spec.rb
@@ -702,7 +702,7 @@ def job_params
created_at: within(0.001).of(good_job.performed_at),
scheduled_at: within(0.001).of(good_job.created_at),
finished_at: within(1.second).of(Time.current),
- duration: Gem::Version.new(Rails.version) >= Gem::Version.new('6.1.0.a') ? be_present : nil,
+ duration: GoodJob::DiscreteExecution.duration_interval_usable? ? be_present : nil,
error: nil,
serialized_params: good_job.serialized_params
)
@@ -741,7 +741,7 @@ def job_params
created_at: within(1.second).of(Time.current),
scheduled_at: within(1.second).of(Time.current),
finished_at: within(1.second).of(Time.current),
- duration: Gem::Version.new(Rails.version) >= Gem::Version.new('6.1.0.a') ? be_present : nil
+ duration: GoodJob::DiscreteExecution.duration_interval_usable? ? be_present : nil
)
end
end
@@ -766,7 +766,7 @@ def job_params
expect(good_job.discrete_executions.first).to have_attributes(
performed_at: within(1.second).of(Time.current),
finished_at: within(1.second).of(Time.current),
- duration: Gem::Version.new(Rails.version) >= Gem::Version.new('6.1.0.a') ? be_present : nil
+ duration: GoodJob::DiscreteExecution.duration_interval_usable? ? be_present : nil
)
end
end
diff --git a/spec/lib/good_job/active_job_extensions/interrupt_errors_spec.rb b/spec/lib/good_job/active_job_extensions/interrupt_errors_spec.rb
index ad92cbf3..b406d4cb 100644
--- a/spec/lib/good_job/active_job_extensions/interrupt_errors_spec.rb
+++ b/spec/lib/good_job/active_job_extensions/interrupt_errors_spec.rb
@@ -83,7 +83,7 @@ def perform
expect(initial_discrete_execution).to have_attributes(
performed_at: be_present,
finished_at: be_present,
- duration: Gem::Version.new(Rails.version) >= Gem::Version.new('6.1.0.a') ? be_present : nil,
+ duration: GoodJob::DiscreteExecution.duration_interval_usable? ? be_present : nil,
error: start_with('GoodJob::InterruptError: Interrupted after starting perform at'),
error_event: GoodJob::Job::ERROR_EVENT_INTERRUPTED
)
@@ -92,7 +92,7 @@ def perform
expect(retried_discrete_execution).to have_attributes(
performed_at: be_present,
finished_at: be_present,
- duration: Gem::Version.new(Rails.version) >= Gem::Version.new('6.1.0.a') ? be_present : nil,
+ duration: GoodJob::DiscreteExecution.duration_interval_usable? ? be_present : nil,
error: start_with('GoodJob::InterruptError: Interrupted after starting perform at'),
error_event: GoodJob::Job::ERROR_EVENT_RETRIED
)