File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -31,14 +31,16 @@ def inner_call
3131 return success ( decisions : [ ] ) if signup_round . maximum_event_signups_as_number <= prev_max_signups
3232
3333 with_relevant_locks do
34- pass_number = 0
35- loop do
36- executed_choices_this_pass = execute_pass ( pass_number )
37- break if executed_choices_this_pass . blank?
38- pass_number += 1
39- end
34+ ActiveRecord ::Base . transaction do
35+ pass_number = 0
36+ loop do
37+ executed_choices_this_pass = execute_pass ( pass_number )
38+ break if executed_choices_this_pass . blank?
39+ pass_number += 1
40+ end
4041
41- ordered_user_con_profiles . update_all ( ranked_choice_ordering_boost : 0 )
42+ ordered_user_con_profiles . update_all ( ranked_choice_ordering_boost : 0 )
43+ end
4244 end
4345
4446 success ( decisions :)
@@ -67,7 +69,7 @@ def execute_pass(pass_number)
6769 prev_decisions = @decisions . dup
6870
6971 executed_choices =
70- ActiveRecord ::Base . transaction do
72+ ActiveRecord ::Base . transaction ( requires_new : true ) do
7173 user_con_profiles = ordered_user_con_profiles . to_a
7274 user_con_profiles . reverse! if signup_round . serpentine_ranked_choice_order? && pass_number . odd?
7375
You can’t perform that action at this time.
0 commit comments