Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 8 additions & 2 deletions crates/libsy/src/algorithms/vgr.rs
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ use crate::algorithms::util::affinity::AffinityRouter;
use crate::core::algorithm::{Algorithm, Driver, RoutingOutcome};
use crate::core::state::State;

mod compaction;
mod config;
mod decide;
mod readout;
Expand Down Expand Up @@ -57,12 +58,17 @@ impl Vgr {
.with_release_on_user_turn()
.with_latch_only([cloud.clone()]),
);
let mut route = FallThrough::new_with_state().with_name("vgr");
if config.compact_handoff {
// First, so every later classifier and the served call see the
// condensed history.
route = route.with_classifier(Arc::new(compaction::Compactor));
}
let classifier = Arc::new(runtime::VgrClassifier {
breaker: safety::CircuitBreaker::new(config.breaker),
config,
});
let route = FallThrough::new_with_state()
.with_name("vgr")
let route = route
.with_processor(turn_affinity.clone())
.with_classifier(turn_affinity)
.with_classifier(classifier);
Expand Down
Loading
Loading