@@ -1529,12 +1529,9 @@ activate_next_consumer(#?STATE{consumers = Cons0,
15291529 State = State0 #? STATE {consumers = Cons ,
15301530 service_queue = ServiceQueue1 ,
15311531 waiting_consumers = Waiting },
1532- Effects1 = consumer_update_active_effects (State , Active ,
1533- false , waiting ,
1534- Effects0 ),
15351532 Effects = consumer_update_active_effects (State , Consumer ,
15361533 true , single_active ,
1537- Effects1 ),
1534+ Effects0 ),
15381535 {State , Effects };
15391536 {{ActiveCKey , ? CONSUMER_PRIORITY (ActivePriority ) = Active },
15401537 {_NextCKey , ? CONSUMER_PRIORITY (WaitingPriority )}}
@@ -1832,22 +1829,8 @@ complete_and_checkout(#{} = Meta, MsgIds, ConsumerKey,
18321829 Effects0 , State0 ) ->
18331830 State1 = complete (Meta , ConsumerKey , MsgIds , Con0 , State0 ),
18341831 % % a completion could have removed the active/quiescing consumer
1835- Effects1 = add_active_effect (Con0 , State1 , Effects0 ),
1836- {State2 , Effects2 } = activate_next_consumer (State1 , Effects1 ),
1837- checkout (Meta , State0 , State2 , Effects2 ).
1838-
1839- add_active_effect (# consumer {status = quiescing } = Consumer ,
1840- #? STATE {cfg = # cfg {consumer_strategy = single_active },
1841- consumers = Consumers } = State ,
1842- Effects ) ->
1843- case active_consumer (Consumers ) of
1844- undefined ->
1845- consumer_update_active_effects (State , Consumer , false , waiting , Effects );
1846- _ ->
1847- Effects
1848- end ;
1849- add_active_effect (_ , _ , Effects ) ->
1850- Effects .
1832+ {State2 , Effects1 } = activate_next_consumer (State1 , Effects0 ),
1833+ checkout (Meta , State0 , State2 , Effects1 ).
18511834
18521835cancel_consumer_effects (ConsumerId ,
18531836 #? STATE {cfg = # cfg {resource = QName }},
0 commit comments