mirror of
https://github.com/fawney19/Aether.git
synced 2026-09-02 01:10:23 +08:00
Use core affinity helpers directly
This commit is contained in:
@@ -1,6 +1,5 @@
|
|||||||
pub(super) use aether_scheduler_core::{
|
use aether_scheduler_core::{
|
||||||
build_scheduler_affinity_cache_key_for_api_key_id, candidate_affinity_hash, candidate_key,
|
build_scheduler_affinity_cache_key_for_api_key_id, SchedulerAffinityTarget,
|
||||||
matches_affinity_target, SchedulerAffinityTarget,
|
|
||||||
};
|
};
|
||||||
|
|
||||||
use crate::data::auth::GatewayAuthApiKeySnapshot;
|
use crate::data::auth::GatewayAuthApiKeySnapshot;
|
||||||
|
|||||||
@@ -1,13 +1,12 @@
|
|||||||
use aether_scheduler_core::{
|
use aether_scheduler_core::{
|
||||||
apply_scheduler_candidate_ranking, effective_provider_key_health_score,
|
apply_scheduler_candidate_ranking, candidate_affinity_hash,
|
||||||
matches_affinity_target, provider_key_health_bucket,
|
effective_provider_key_health_score, matches_affinity_target, provider_key_health_bucket,
|
||||||
requested_capability_priority_for_candidate, SchedulerAffinityTarget,
|
requested_capability_priority_for_candidate, SchedulerAffinityTarget,
|
||||||
SchedulerRankableCandidate, SchedulerRankingContext, SchedulerRankingMode,
|
SchedulerRankableCandidate, SchedulerRankingContext, SchedulerRankingMode,
|
||||||
};
|
};
|
||||||
|
|
||||||
use crate::scheduler::config::{SchedulerOrderingConfig, SchedulerSchedulingMode};
|
use crate::scheduler::config::{SchedulerOrderingConfig, SchedulerSchedulingMode};
|
||||||
|
|
||||||
use super::affinity::candidate_affinity_hash;
|
|
||||||
use super::runtime::CandidateRuntimeSelectionSnapshot;
|
use super::runtime::CandidateRuntimeSelectionSnapshot;
|
||||||
use super::SchedulerMinimalCandidateSelectionCandidate;
|
use super::SchedulerMinimalCandidateSelectionCandidate;
|
||||||
|
|
||||||
|
|||||||
@@ -1,8 +1,7 @@
|
|||||||
use std::collections::BTreeSet;
|
use std::collections::BTreeSet;
|
||||||
|
|
||||||
use aether_scheduler_core::SchedulerAffinityTarget;
|
use aether_scheduler_core::{candidate_key, SchedulerAffinityTarget};
|
||||||
|
|
||||||
use super::affinity::candidate_key;
|
|
||||||
use super::runtime::{current_candidate_runtime_skip_reason, CandidateRuntimeSelectionSnapshot};
|
use super::runtime::{current_candidate_runtime_skip_reason, CandidateRuntimeSelectionSnapshot};
|
||||||
use super::{SchedulerMinimalCandidateSelectionCandidate, SchedulerSkippedCandidate};
|
use super::{SchedulerMinimalCandidateSelectionCandidate, SchedulerSkippedCandidate};
|
||||||
|
|
||||||
|
|||||||
@@ -10,10 +10,10 @@ use aether_data_contracts::repository::candidates::{
|
|||||||
RequestCandidateStatus, StoredRequestCandidate,
|
RequestCandidateStatus, StoredRequestCandidate,
|
||||||
};
|
};
|
||||||
use aether_scheduler_core::{
|
use aether_scheduler_core::{
|
||||||
apply_scheduler_candidate_ranking, enumerate_minimal_candidate_selection,
|
apply_scheduler_candidate_ranking, candidate_affinity_hash,
|
||||||
EnumerateMinimalCandidateSelectionInput, SchedulerMinimalCandidateSelectionCandidate,
|
enumerate_minimal_candidate_selection, EnumerateMinimalCandidateSelectionInput,
|
||||||
SchedulerPriorityMode, SchedulerRankableCandidate, SchedulerRankingContext,
|
SchedulerMinimalCandidateSelectionCandidate, SchedulerPriorityMode, SchedulerRankableCandidate,
|
||||||
SchedulerRankingMode,
|
SchedulerRankingContext, SchedulerRankingMode,
|
||||||
};
|
};
|
||||||
|
|
||||||
use crate::cache::SchedulerAffinityTarget;
|
use crate::cache::SchedulerAffinityTarget;
|
||||||
@@ -24,7 +24,7 @@ use crate::data::candidate_selection::{
|
|||||||
use crate::data::GatewayDataState;
|
use crate::data::GatewayDataState;
|
||||||
use crate::{AppState, GatewayError};
|
use crate::{AppState, GatewayError};
|
||||||
|
|
||||||
use super::super::affinity::{build_scheduler_affinity_cache_key, candidate_affinity_hash};
|
use super::super::affinity::build_scheduler_affinity_cache_key;
|
||||||
use super::super::selection::select_minimal_candidate as select_candidate_impl;
|
use super::super::selection::select_minimal_candidate as select_candidate_impl;
|
||||||
use super::support::{sample_auth_snapshot, sample_key, sample_provider, sample_row};
|
use super::support::{sample_auth_snapshot, sample_key, sample_provider, sample_row};
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user