good_job 3.99.0 → 4.0.1
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 +21 -0
- data/app/charts/good_job/scheduled_by_queue_chart.rb +2 -2
- data/app/controllers/good_job/cron_entries_controller.rb +0 -8
- data/app/controllers/good_job/metrics_controller.rb +1 -1
- data/app/controllers/good_job/performance_controller.rb +19 -0
- data/app/models/concerns/good_job/filterable.rb +1 -1
- data/app/models/good_job/base_execution.rb +104 -201
- data/app/models/good_job/cron_entry.rb +0 -2
- data/app/models/good_job/discrete_execution.rb +1 -31
- data/app/models/good_job/execution.rb +3 -7
- data/app/models/good_job/job.rb +37 -116
- data/app/models/good_job/process.rb +7 -20
- data/app/views/good_job/batches/index.html.erb +11 -15
- data/app/views/good_job/jobs/_executions.erb +1 -1
- data/app/views/good_job/jobs/_table.erb +1 -1
- data/app/views/good_job/jobs/show.html.erb +1 -8
- data/app/views/good_job/performance/index.html.erb +43 -0
- data/app/views/good_job/shared/_navbar.erb +2 -2
- data/config/locales/de.yml +4 -7
- data/config/locales/en.yml +4 -7
- data/config/locales/es.yml +4 -7
- data/config/locales/fr.yml +4 -7
- data/config/locales/it.yml +4 -7
- data/config/locales/ja.yml +4 -7
- data/config/locales/ko.yml +4 -7
- data/config/locales/nl.yml +4 -7
- data/config/locales/pt-BR.yml +4 -7
- data/config/locales/ru.yml +4 -7
- data/config/locales/tr.yml +4 -7
- data/config/locales/uk.yml +4 -7
- data/config/routes.rb +1 -1
- data/lib/generators/good_job/templates/update/migrations/01_create_good_jobs.rb.erb +65 -3
- data/lib/good_job/active_job_extensions/batches.rb +1 -1
- data/lib/good_job/active_job_extensions/concurrency.rb +10 -10
- data/lib/good_job/adapter.rb +13 -24
- data/lib/good_job/configuration.rb +5 -1
- data/lib/good_job/current_thread.rb +6 -6
- data/lib/good_job/job_performer.rb +2 -2
- data/lib/good_job/log_subscriber.rb +2 -10
- data/lib/good_job/notifier.rb +3 -3
- data/lib/good_job/version.rb +1 -1
- data/lib/good_job.rb +16 -21
- metadata +18 -32
- data/app/controllers/good_job/performances_controller.rb +0 -23
- data/app/views/good_job/performances/show.html.erb +0 -50
- data/lib/generators/good_job/templates/update/migrations/02_create_good_job_settings.rb.erb +0 -20
- data/lib/generators/good_job/templates/update/migrations/03_create_index_good_jobs_jobs_on_priority_created_at_when_unfinished.rb.erb +0 -19
- data/lib/generators/good_job/templates/update/migrations/04_create_good_job_batches.rb.erb +0 -35
- data/lib/generators/good_job/templates/update/migrations/05_create_good_job_executions.rb.erb +0 -33
- data/lib/generators/good_job/templates/update/migrations/06_create_good_jobs_error_event.rb.erb +0 -16
- data/lib/generators/good_job/templates/update/migrations/07_recreate_good_job_cron_indexes_with_conditional.rb.erb +0 -45
- data/lib/generators/good_job/templates/update/migrations/08_create_good_job_labels.rb.erb +0 -15
- data/lib/generators/good_job/templates/update/migrations/09_create_good_job_labels_index.rb.erb +0 -22
- data/lib/generators/good_job/templates/update/migrations/10_remove_good_job_active_id_index.rb.erb +0 -21
- data/lib/generators/good_job/templates/update/migrations/11_create_index_good_job_jobs_for_candidate_lookup.rb.erb +0 -19
- data/lib/generators/good_job/templates/update/migrations/12_create_good_job_execution_error_backtrace.rb.erb +0 -15
- data/lib/generators/good_job/templates/update/migrations/13_create_good_job_process_lock_ids.rb.erb +0 -18
- data/lib/generators/good_job/templates/update/migrations/14_create_good_job_process_lock_indexes.rb.erb +0 -38
- data/lib/generators/good_job/templates/update/migrations/15_create_good_job_execution_duration.rb.erb +0 -15
data/lib/generators/good_job/templates/update/migrations/13_create_good_job_process_lock_ids.rb.erb
DELETED
@@ -1,18 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
class CreateGoodJobProcessLockIds < ActiveRecord::Migration<%= migration_version %>
|
4
|
-
def change
|
5
|
-
reversible do |dir|
|
6
|
-
dir.up do
|
7
|
-
# Ensure this incremental update migration is idempotent
|
8
|
-
# with monolithic install migration.
|
9
|
-
return if connection.column_exists?(:good_jobs, :locked_by_id)
|
10
|
-
end
|
11
|
-
end
|
12
|
-
|
13
|
-
add_column :good_jobs, :locked_by_id, :uuid
|
14
|
-
add_column :good_jobs, :locked_at, :datetime
|
15
|
-
add_column :good_job_executions, :process_id, :uuid
|
16
|
-
add_column :good_job_processes, :lock_type, :integer, limit: 2
|
17
|
-
end
|
18
|
-
end
|
@@ -1,38 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
class CreateGoodJobProcessLockIndexes < ActiveRecord::Migration<%= migration_version %>
|
4
|
-
disable_ddl_transaction!
|
5
|
-
|
6
|
-
def change
|
7
|
-
reversible do |dir|
|
8
|
-
dir.up do
|
9
|
-
unless connection.index_name_exists?(:good_jobs, :index_good_jobs_on_priority_scheduled_at_unfinished_unlocked)
|
10
|
-
add_index :good_jobs, [:priority, :scheduled_at],
|
11
|
-
order: { priority: "ASC NULLS LAST", scheduled_at: :asc },
|
12
|
-
where: "finished_at IS NULL AND locked_by_id IS NULL",
|
13
|
-
name: :index_good_jobs_on_priority_scheduled_at_unfinished_unlocked,
|
14
|
-
algorithm: :concurrently
|
15
|
-
end
|
16
|
-
|
17
|
-
unless connection.index_name_exists?(:good_jobs, :index_good_jobs_on_locked_by_id)
|
18
|
-
add_index :good_jobs, :locked_by_id,
|
19
|
-
where: "locked_by_id IS NOT NULL",
|
20
|
-
name: :index_good_jobs_on_locked_by_id,
|
21
|
-
algorithm: :concurrently
|
22
|
-
end
|
23
|
-
|
24
|
-
unless connection.index_name_exists?(:good_job_executions, :index_good_job_executions_on_process_id_and_created_at)
|
25
|
-
add_index :good_job_executions, [:process_id, :created_at],
|
26
|
-
name: :index_good_job_executions_on_process_id_and_created_at,
|
27
|
-
algorithm: :concurrently
|
28
|
-
end
|
29
|
-
end
|
30
|
-
|
31
|
-
dir.down do
|
32
|
-
remove_index(:good_jobs, name: :index_good_jobs_on_priority_scheduled_at_unfinished_unlocked) if connection.index_name_exists?(:good_jobs, :index_good_jobs_on_priority_scheduled_at_unfinished_unlocked)
|
33
|
-
remove_index(:good_jobs, name: :index_good_jobs_on_locked_by_id) if connection.index_name_exists?(:good_jobs, :index_good_jobs_on_locked_by_id)
|
34
|
-
remove_index(:good_job_executions, name: :index_good_job_executions_on_process_id_and_created_at) if connection.index_name_exists?(:good_job_executions, :index_good_job_executions_on_process_id_and_created_at)
|
35
|
-
end
|
36
|
-
end
|
37
|
-
end
|
38
|
-
end
|
@@ -1,15 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
class CreateGoodJobExecutionDuration < ActiveRecord::Migration<%= migration_version %>
|
4
|
-
def change
|
5
|
-
reversible do |dir|
|
6
|
-
dir.up do
|
7
|
-
# Ensure this incremental update migration is idempotent
|
8
|
-
# with monolithic install migration.
|
9
|
-
return if connection.column_exists?(:good_job_executions, :duration)
|
10
|
-
end
|
11
|
-
end
|
12
|
-
|
13
|
-
add_column :good_job_executions, :duration, :interval
|
14
|
-
end
|
15
|
-
end
|