Skip to content

Commit c06c3d9

Browse files
committed
Remove ActiveJob
This removes the ActiveJob Railtie and stops including the test helper to make it explicit that we're not using ActiveJob anymore. Jira-Issue: MAV-7288
1 parent 6ead5a6 commit c06c3d9

8 files changed

Lines changed: 1 addition & 17 deletions

config/application.rb

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
require "rails"
66
# Pick the frameworks you want:
77
require "active_model/railtie"
8-
require "active_job/railtie"
8+
# require "active_job/railtie"
99
require "active_record/railtie"
1010
require "active_storage/engine"
1111
require "action_controller/railtie"
@@ -72,8 +72,6 @@ class Application < Rails::Application
7272

7373
config.active_model.i18n_customize_full_message = true
7474

75-
config.active_job.queue_adapter = :sidekiq
76-
7775
config.view_component.default_preview_layout = "component_preview"
7876
config.view_component.previews.controller = "ComponentPreviewsController"
7977
config.view_component.previews.paths << Rails.root.join(

config/environments/development.rb

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -51,9 +51,6 @@
5151
# Append comments with runtime information tags to SQL queries in logs.
5252
config.active_record.query_log_tags_enabled = true
5353

54-
# Highlight code that enqueued background job in logs.
55-
config.active_job.verbose_enqueue_logs = true
56-
5754
# Highlight code that triggered redirect in logs.
5855
config.action_dispatch.verbose_redirect_logs = true
5956

config/environments/production.rb

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -95,9 +95,6 @@
9595
end
9696
}
9797

98-
# Replace the default in-process and non-durable queuing backend for Active Job.
99-
# config.active_job.queue_adapter = :resque
100-
10198
# Enable locale fallbacks for I18n (makes lookups for any locale fall back to
10299
# the I18n.default_locale when a translation cannot be found).
103100
config.i18n.fallbacks = true

spec/jobs/bulk_remove_parent_relationships_job_spec.rb

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22

33
describe BulkRemoveParentRelationshipsJob do
44
include ImportsHelper
5-
include ActiveJob::TestHelper
65

76
subject(:perform_job) do
87
described_class.new.perform(

spec/jobs/pds_cascading_search_job_spec.rb

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
# frozen_string_literal: true
22

33
describe PDSCascadingSearchJob do
4-
include ActiveJob::TestHelper
54
include ImportsHelper
65

76
let(:today) { Time.zone.local(2025, 9, 1, 12, 0, 0) }

spec/jobs/process_patient_changeset_job_spec.rb

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
# frozen_string_literal: true
22

33
describe ProcessPatientChangesetJob, :pds do
4-
include ActiveJob::TestHelper
5-
64
let(:programme) { Programme.hpv }
75
let(:team) { create(:team, programmes: [programme]) }
86
let(:import) { create(:cohort_import, team:) }

spec/lib/already_had_notification_sender_spec.rb

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,6 @@
1919
create(:vaccination_record, programme:, patient:, session:, performed_at:)
2020
end
2121

22-
before { ActiveJob::Base.queue_adapter.enqueued_jobs.clear }
23-
2422
shared_examples "sends no notifications" do
2523
it { expect { call }.not_to deliver_email }
2624
it { expect { call }.not_to deliver_sms }

spec/spec_helper.rb

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,6 @@
116116
Console.logger.off!
117117
Capybara.server = :falcon
118118

119-
ActiveJob::Base.queue_adapter = :test
120119
Sidekiq.testing!(:fake)
121120

122121
OmniAuth.config.test_mode = true
@@ -209,7 +208,6 @@
209208

210209
config.around { |example| DatabaseCleaner.cleaning { example.run } }
211210

212-
config.include ActiveJob::TestHelper, type: :feature
213211
config.include ActiveSupport::Testing::TimeHelpers
214212
config.include Capybara::RSpecMatchers, type: :component
215213
config.include Devise::Test::ControllerHelpers, type: :controller

0 commit comments

Comments
 (0)