L-M: Only create rescheduler when rescheduling

Co-authored-by: Jarrett Ye <jarrett.ye@outlook.com>
This commit is contained in:
Daniel Pechersky 2025-09-19 15:17:41 +07:00 committed by GitHub
parent fed5bc9ea6
commit 7b309a300e
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -159,8 +159,9 @@ impl Collection {
&mut on_updated_card,
)?;
let mut rescheduler = self
.get_config_bool(BoolKey::LoadBalancerEnabled)
let mut rescheduler = req
.reschedule
.bitand(self.get_config_bool(BoolKey::LoadBalancerEnabled))
.then(|| Rescheduler::new(self))
.transpose()?;