mirror of
https://github.com/fawney19/Aether.git
synced 2026-09-03 01:40:21 +08:00
feat: pass session affinity through planner inputs
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
use aether_scheduler_core::SchedulerMinimalCandidateSelectionCandidate;
|
||||
use aether_scheduler_core::{ClientSessionAffinity, SchedulerMinimalCandidateSelectionCandidate};
|
||||
use std::time::Duration;
|
||||
use tokio::time::Instant;
|
||||
|
||||
@@ -18,6 +18,7 @@ impl<'a> PlannerAppState<'a> {
|
||||
require_streaming: bool,
|
||||
required_capabilities: Option<&serde_json::Value>,
|
||||
auth_snapshot: Option<&GatewayAuthApiKeySnapshot>,
|
||||
client_session_affinity: Option<&ClientSessionAffinity>,
|
||||
now_unix_secs: u64,
|
||||
) -> Result<Vec<SchedulerMinimalCandidateSelectionCandidate>, GatewayError> {
|
||||
let enable_model_directives =
|
||||
@@ -35,6 +36,7 @@ impl<'a> PlannerAppState<'a> {
|
||||
require_streaming,
|
||||
required_capabilities,
|
||||
auth_snapshot,
|
||||
client_session_affinity,
|
||||
now_unix_secs,
|
||||
enable_model_directives,
|
||||
)
|
||||
@@ -48,6 +50,7 @@ impl<'a> PlannerAppState<'a> {
|
||||
require_streaming: bool,
|
||||
required_capabilities: Option<&serde_json::Value>,
|
||||
auth_snapshot: Option<&GatewayAuthApiKeySnapshot>,
|
||||
client_session_affinity: Option<&ClientSessionAffinity>,
|
||||
now_unix_secs: u64,
|
||||
) -> Result<
|
||||
(
|
||||
@@ -77,6 +80,7 @@ impl<'a> PlannerAppState<'a> {
|
||||
require_streaming,
|
||||
required_capabilities,
|
||||
auth_snapshot,
|
||||
client_session_affinity,
|
||||
attempt_now_unix_secs,
|
||||
enable_model_directives,
|
||||
)
|
||||
@@ -106,6 +110,7 @@ impl<'a> PlannerAppState<'a> {
|
||||
candidates: Vec<SchedulerMinimalCandidateSelectionCandidate>,
|
||||
required_capabilities: Option<&serde_json::Value>,
|
||||
auth_snapshot: Option<&GatewayAuthApiKeySnapshot>,
|
||||
client_session_affinity: Option<&ClientSessionAffinity>,
|
||||
now_unix_secs: u64,
|
||||
) -> Result<
|
||||
(
|
||||
@@ -121,6 +126,7 @@ impl<'a> PlannerAppState<'a> {
|
||||
candidates,
|
||||
required_capabilities,
|
||||
auth_snapshot,
|
||||
client_session_affinity,
|
||||
now_unix_secs,
|
||||
)
|
||||
.await
|
||||
|
||||
Reference in New Issue
Block a user