Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -308,15 +308,15 @@ GEM
rake
formatador (0.2.5)
foundation_emails (2.2.1.0)
fugit (1.6.0)
fugit (1.7.1)
et-orbi (~> 1, >= 1.2.7)
raabro (~> 1.4)
geocoder (1.7.0)
get_process_mem (0.2.7)
ffi (~> 1.0)
globalid (1.0.0)
activesupport (>= 5.0)
good_job (3.4.4)
good_job (3.6.0)
activejob (>= 6.0.0)
activerecord (>= 6.0.0)
concurrent-ruby (>= 1.0.2)
Expand Down Expand Up @@ -729,7 +729,7 @@ GEM
xpath (3.2.0)
nokogiri (~> 1.8)
yard (0.9.26)
zeitwerk (2.6.0)
zeitwerk (2.6.1)
zonebie (0.6.1)
zxcvbn (0.1.7)

Expand Down
2 changes: 2 additions & 0 deletions config/application.rb
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,8 @@ class Application < Rails::Application
config.good_job.enable_cron = true
config.good_job.max_threads = IdentityConfig.store.good_job_max_threads
config.good_job.queues = IdentityConfig.store.good_job_queues
config.good_job.preserve_job_records = false
config.good_job.queue_select_limit = IdentityConfig.store.good_job_queue_select_limit
# see config/initializers/job_configurations.rb for cron schedule

includes_star_queue = config.good_job.queues.split(';').any? do |name_threads|
Expand Down
1 change: 1 addition & 0 deletions config/application.yml.default
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,7 @@ event_disavowal_expiration_hours: 240
geo_data_file_path: 'geo_data/GeoLite2-City.mmdb'
good_job_max_threads: 5
good_job_queues: 'default:5;low:1;*'
good_job_queue_select_limit: 5_000
gpo_designated_receiver_pii: '{}'
hide_phone_mfa_signup: false
identity_pki_disabled: false
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# frozen_string_literal: true
class CreateIndexGoodJobsJobsOnPriorityCreatedAtWhenUnfinished < ActiveRecord::Migration[7.0]
disable_ddl_transaction!

def change
reversible do |dir|
dir.up do
# Ensure this incremental update migration is idempotent
# with monolithic install migration.
return if connection.index_name_exists?(:good_jobs, :index_good_jobs_jobs_on_priority_created_at_when_unfinished)
end
end

add_index :good_jobs, [:priority, :created_at], order: { priority: "DESC NULLS LAST", created_at: :asc },
where: "finished_at IS NULL", name: :index_good_jobs_jobs_on_priority_created_at_when_unfinished,
algorithm: :concurrently
end
end
1 change: 1 addition & 0 deletions lib/identity_config.rb
Original file line number Diff line number Diff line change
Expand Up @@ -177,6 +177,7 @@ def self.build_store(config_map)
config.add(:geo_data_file_path, type: :string)
config.add(:good_job_max_threads, type: :integer)
config.add(:good_job_queues, type: :string)
config.add(:good_job_queue_select_limit, type: :integer)
config.add(:gpo_designated_receiver_pii, type: :json, options: { symbolize_names: true })
config.add(:hide_phone_mfa_signup, type: :boolean)
config.add(:hmac_fingerprinter_key, type: :string)
Expand Down