From 55ce6d078e0876f84e9c3b723cd0e330ba414744 Mon Sep 17 00:00:00 2001 From: Zhaofeng Li Date: Sat, 22 Jan 2022 17:50:53 -0800 Subject: [PATCH] Remove unused stuff --- src/job.rs | 17 ----------------- src/nix/deployment/mod.rs | 4 ---- src/nix/host/ssh.rs | 3 --- 3 files changed, 24 deletions(-) diff --git a/src/job.rs b/src/job.rs index a205bad..22e873c 100644 --- a/src/job.rs +++ b/src/job.rs @@ -133,9 +133,6 @@ struct JobMetadata { /// Type of the job. job_type: JobType, - /// Custom human-readable name of the job. - friendly_name: Option, - /// List of associated nodes. /// /// Some jobs may be related to multiple nodes (e.g., building @@ -151,12 +148,6 @@ struct JobMetadata { /// For jobs in the Succeeded state, this might contain a custom /// message. custom_message: Option, - - /// Last human-readable message from the job. - /// - /// This is so we can quickly repaint without needing to filter - /// through the event logs. - last_message: Option, } /// Message to create a new job. @@ -165,9 +156,6 @@ pub struct JobCreation { /// Type of the job. job_type: JobType, - /// Custom human-readable name of the job. - friendly_name: Option, - /// List of associated nodes. nodes: Vec, } @@ -255,10 +243,8 @@ impl JobMonitor { let metadata = JobMetadata { job_id: meta_job_id, job_type: JobType::Meta, - friendly_name: None, nodes: Vec::new(), state: JobState::Running, - last_message: None, custom_message: None, }; @@ -300,10 +286,8 @@ impl JobMonitor { let metadata = JobMetadata { job_id: message.job_id, job_type: creation.job_type, - friendly_name: creation.friendly_name.clone(), nodes: creation.nodes.clone(), state: JobState::Waiting, - last_message: None, custom_message: None, }; @@ -504,7 +488,6 @@ impl JobHandleInner { pub fn create_job(&self, job_type: JobType, nodes: Vec) -> ColmenaResult { let job_id = JobId::new(); let creation = JobCreation { - friendly_name: None, job_type, nodes, }; diff --git a/src/nix/deployment/mod.rs b/src/nix/deployment/mod.rs index 1790684..283efd8 100644 --- a/src/nix/deployment/mod.rs +++ b/src/nix/deployment/mod.rs @@ -61,9 +61,6 @@ pub struct Deployment { /// Handle to send messages to the ProgressOutput. progress: Option, - /// Names of the target nodes. - nodes: Vec, - /// Handles to the deployment targets. targets: HashMap, @@ -109,7 +106,6 @@ impl Deployment { options: Options::default(), nix_options: NixOptions::default(), progress, - nodes: targets.keys().cloned().collect(), targets, parallelism_limit: ParallelismLimit::default(), evaluation_node_limit: EvaluationNodeLimit::default(), diff --git a/src/nix/host/ssh.rs b/src/nix/host/ssh.rs index 006a694..6857338 100644 --- a/src/nix/host/ssh.rs +++ b/src/nix/host/ssh.rs @@ -30,7 +30,6 @@ pub struct Ssh { /// Command to elevate privileges with. privilege_escalation_command: Vec, - friendly_name: String, job: Option, } @@ -100,13 +99,11 @@ impl Host for Ssh { impl Ssh { pub fn new(user: String, host: String) -> Self { - let friendly_name = host.clone(); Self { user, host, port: None, ssh_config: None, - friendly_name, privilege_escalation_command: Vec::new(), job: None, }