automation and view updates

This commit is contained in:
Jason Jordan
2026-04-17 15:35:10 -04:00
parent 247a075c9c
commit 7ab1143db8
30 changed files with 124704 additions and 602 deletions
@@ -21,13 +21,16 @@ module AutomationService
member_update_futures = vw_mb_members.map do |vw_mb_member|
Concurrent::Future.execute do
ActiveRecord::Base.connection_pool.with_connection do
UpdateMemberJob.perform_now(@pb_entity_key, employer.id, card_setup.has_divisions, card_setup.has_dental, vw_mb_member)
UpdateMemberJob.perform_now(vw_mb_member.pb_entity_key, employer.id, card_setup.has_divisions, card_setup.has_dental, vw_mb_member)
end
end
end
member_updates = member_update_futures.map(&:value).compact
employer.members = member_updates
if member_updates.empty? && employer.id_card_setup.active
employer.active = false
end
employer.save
end