Skip to content

Commit 6ead5a6

Browse files
committed
Remove ActiveJob jobs
This removes the remaining ActiveJob jobs and replaces them with the Sidekiq equivalents. This is safe to deploy because there are no more ActiveJob jobs in the queues. For now we keep around the old classes (prefixed with `Sidekiq`) in case any are in the queue when this is deployed. Jira-Issue: MAV-7288
1 parent f377964 commit 6ead5a6

116 files changed

Lines changed: 862 additions & 1055 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

app/controllers/class_imports_controller.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ def create
2929
)
3030

3131
if @class_import.save
32-
ProcessImportSidekiqJob.perform_async(@class_import.to_global_id.to_s)
32+
ProcessImportJob.perform_async(@class_import.to_global_id.to_s)
3333
redirect_to imports_path, flash: { success: "Import processing started" }
3434
else
3535
render :new, status: :unprocessable_content and return

app/controllers/cohort_imports_controller.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ def create
2727
)
2828

2929
if @cohort_import.save
30-
ProcessImportSidekiqJob.perform_async(@cohort_import.to_global_id.to_s)
30+
ProcessImportJob.perform_async(@cohort_import.to_global_id.to_s)
3131
redirect_to imports_path, flash: { success: "Import processing started" }
3232
else
3333
render :new, status: :unprocessable_content and return

app/controllers/consent_forms_controller.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -118,9 +118,9 @@ def create_patient
118118
end
119119

120120
if patient.nhs_number.nil?
121-
PatientNHSNumberLookupSidekiqJob.perform_async(patient.id)
121+
PatientNHSNumberLookupJob.perform_async(patient.id)
122122
else
123-
PatientUpdateFromPDSSidekiqJob.perform_async(patient.id, nil)
123+
PatientUpdateFromPDSJob.perform_async(patient.id, nil)
124124
end
125125

126126
flash[:success] = "#{patient.full_name}’s record created from a consent \

app/controllers/immunisation_imports_controller.rb

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,7 @@ def create
2323
)
2424

2525
if @immunisation_import.save
26-
ProcessImportSidekiqJob.perform_async(
27-
@immunisation_import.to_global_id.to_s
28-
)
26+
ProcessImportJob.perform_async(@immunisation_import.to_global_id.to_s)
2927
redirect_to imports_path, flash: { success: "Import processing started" }
3028
else
3129
render :new, status: :unprocessable_content and return

app/controllers/parent_interface/consent_forms/edit_controller.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ def handle_ethnicity_completion!(model)
9696
# parent decides to answer "Yes" or "No" (they might not)
9797
# to the ethnicity questions, the job will make sure the
9898
# ethnicity information is copied to the matched patient.
99-
ProcessConsentFormSidekiqJob.perform_async(model.id)
99+
ProcessConsentFormJob.perform_async(model.id)
100100

101101
redirect_to submitted_parent_interface_consent_form_path(model)
102102
end

app/controllers/parent_interface/consent_forms_controller.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ def record
6767
# answering. Running the job ensures the consent form is still
6868
# processed and, if ethnicity was provided, it gets copied
6969
# onto the matched patient.
70-
ProcessConsentFormSidekiqJob.perform_async(@consent_form.id)
70+
ProcessConsentFormJob.perform_async(@consent_form.id)
7171

7272
if Flipper.enabled?(:ethnicity_capture)
7373
redirect_to parent_interface_consent_form_edit_path(

app/controllers/patients/edit_controller.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ def update_nhs_number
2323

2424
if @patient.save
2525
if @patient.nhs_number.present?
26-
PatientUpdateFromPDSSidekiqJob.perform_async(@patient.id, nil)
26+
PatientUpdateFromPDSJob.perform_async(@patient.id, nil)
2727
end
2828

2929
redirect_to edit_patient_path(@patient)

app/forms/bulk_remove_parents_form.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ def save!
3131
import
3232
.parent_relationship_ids
3333
.each_slice(BATCH_SIZE) do |batch_ids|
34-
BulkRemoveParentRelationshipsSidekiqJob.perform_async(
34+
BulkRemoveParentRelationshipsJob.perform_async(
3535
import.to_global_id.to_s,
3636
batch_ids,
3737
current_user.id,
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# frozen_string_literal: true
22

3-
class ApplicationJobSidekiq
3+
class ApplicationJob
44
include Sidekiq::Job
55
end

app/jobs/application_job_active_job.rb

Lines changed: 0 additions & 7 deletions
This file was deleted.

0 commit comments

Comments
 (0)