[model-gateway] fix imports and delete unused code (#14911)
This commit is contained in:
@@ -97,8 +97,6 @@ pub struct DiscoverMcpInventoryStep;
|
|||||||
#[async_trait]
|
#[async_trait]
|
||||||
impl StepExecutor for DiscoverMcpInventoryStep {
|
impl StepExecutor for DiscoverMcpInventoryStep {
|
||||||
async fn execute(&self, context: &mut WorkflowContext) -> WorkflowResult<StepResult> {
|
async fn execute(&self, context: &mut WorkflowContext) -> WorkflowResult<StepResult> {
|
||||||
use rmcp::{service::RunningService, RoleClient};
|
|
||||||
|
|
||||||
let config_request: Arc<McpServerConfigRequest> =
|
let config_request: Arc<McpServerConfigRequest> =
|
||||||
context.get_or_err("mcp_server_config")?;
|
context.get_or_err("mcp_server_config")?;
|
||||||
let app_context: Arc<AppContext> = context.get_or_err("app_context")?;
|
let app_context: Arc<AppContext> = context.get_or_err("app_context")?;
|
||||||
@@ -143,8 +141,6 @@ pub struct RegisterMcpServerStep;
|
|||||||
#[async_trait]
|
#[async_trait]
|
||||||
impl StepExecutor for RegisterMcpServerStep {
|
impl StepExecutor for RegisterMcpServerStep {
|
||||||
async fn execute(&self, context: &mut WorkflowContext) -> WorkflowResult<StepResult> {
|
async fn execute(&self, context: &mut WorkflowContext) -> WorkflowResult<StepResult> {
|
||||||
use rmcp::{service::RunningService, RoleClient};
|
|
||||||
|
|
||||||
let config_request: Arc<McpServerConfigRequest> =
|
let config_request: Arc<McpServerConfigRequest> =
|
||||||
context.get_or_err("mcp_server_config")?;
|
context.get_or_err("mcp_server_config")?;
|
||||||
let app_context: Arc<AppContext> = context.get_or_err("app_context")?;
|
let app_context: Arc<AppContext> = context.get_or_err("app_context")?;
|
||||||
|
|||||||
@@ -9,7 +9,7 @@
|
|||||||
//! 3. RemoveFromWorkerRegistry - Remove workers from worker registry
|
//! 3. RemoveFromWorkerRegistry - Remove workers from worker registry
|
||||||
//! 4. UpdateRemainingPolicies - Update cache-aware policies for remaining workers
|
//! 4. UpdateRemainingPolicies - Update cache-aware policies for remaining workers
|
||||||
|
|
||||||
use std::{collections::HashSet, sync::Arc};
|
use std::{collections::HashSet, sync::Arc, time::Duration};
|
||||||
|
|
||||||
use async_trait::async_trait;
|
use async_trait::async_trait;
|
||||||
use tracing::{debug, info};
|
use tracing::{debug, info};
|
||||||
@@ -239,8 +239,6 @@ impl StepExecutor for UpdateRemainingPoliciesStep {
|
|||||||
|
|
||||||
/// Create a worker removal workflow definition
|
/// Create a worker removal workflow definition
|
||||||
pub fn create_worker_removal_workflow() -> WorkflowDefinition {
|
pub fn create_worker_removal_workflow() -> WorkflowDefinition {
|
||||||
use std::time::Duration;
|
|
||||||
|
|
||||||
WorkflowDefinition::new("worker_removal", "Remove worker from router")
|
WorkflowDefinition::new("worker_removal", "Remove worker from router")
|
||||||
.add_step(
|
.add_step(
|
||||||
StepDefinition::new(
|
StepDefinition::new(
|
||||||
|
|||||||
@@ -269,9 +269,6 @@ pub enum WorkflowError {
|
|||||||
|
|
||||||
#[error("Context value not found: {0}")]
|
#[error("Context value not found: {0}")]
|
||||||
ContextValueNotFound(String),
|
ContextValueNotFound(String),
|
||||||
|
|
||||||
#[error("Context value type mismatch: {0}")]
|
|
||||||
ContextTypeMismatch(String),
|
|
||||||
}
|
}
|
||||||
|
|
||||||
pub type WorkflowResult<T> = Result<T, WorkflowError>;
|
pub type WorkflowResult<T> = Result<T, WorkflowError>;
|
||||||
|
|||||||
Reference in New Issue
Block a user