We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 057e29d commit 698a102Copy full SHA for 698a102
1 file changed
app/lib/mavis_cli/vaccination_records/sync.rb
@@ -30,8 +30,11 @@ def call(vaccination_record_id:, **)
30
return
31
end
32
33
- vaccination_record.update!(
34
- nhs_immunisations_api_sync_pending_at: Time.current
+ # Do not trigger the sync through the commit hook as we want to perform
+ # the sync synchronously instead of enqueueing a background job.
35
+ vaccination_record.update_columns(
36
+ nhs_immunisations_api_sync_pending_at: Time.current,
37
+ touch: true
38
)
39
NHS::ImmunisationsAPI.sync_immunisation(vaccination_record)
40
puts "Successfully synced vaccination record #{vaccination_record_id}"
0 commit comments