Remove unused stuff

This commit is contained in:
Zhaofeng Li 2022-01-22 17:50:53 -08:00
parent 7f3e15f1a7
commit 55ce6d078e
3 changed files with 0 additions and 24 deletions

View file

@ -133,9 +133,6 @@ struct JobMetadata {
/// Type of the job. /// Type of the job.
job_type: JobType, job_type: JobType,
/// Custom human-readable name of the job.
friendly_name: Option<String>,
/// List of associated nodes. /// List of associated nodes.
/// ///
/// Some jobs may be related to multiple nodes (e.g., building /// 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 /// For jobs in the Succeeded state, this might contain a custom
/// message. /// message.
custom_message: Option<String>, custom_message: Option<String>,
/// 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<String>,
} }
/// Message to create a new job. /// Message to create a new job.
@ -165,9 +156,6 @@ pub struct JobCreation {
/// Type of the job. /// Type of the job.
job_type: JobType, job_type: JobType,
/// Custom human-readable name of the job.
friendly_name: Option<String>,
/// List of associated nodes. /// List of associated nodes.
nodes: Vec<NodeName>, nodes: Vec<NodeName>,
} }
@ -255,10 +243,8 @@ impl JobMonitor {
let metadata = JobMetadata { let metadata = JobMetadata {
job_id: meta_job_id, job_id: meta_job_id,
job_type: JobType::Meta, job_type: JobType::Meta,
friendly_name: None,
nodes: Vec::new(), nodes: Vec::new(),
state: JobState::Running, state: JobState::Running,
last_message: None,
custom_message: None, custom_message: None,
}; };
@ -300,10 +286,8 @@ impl JobMonitor {
let metadata = JobMetadata { let metadata = JobMetadata {
job_id: message.job_id, job_id: message.job_id,
job_type: creation.job_type, job_type: creation.job_type,
friendly_name: creation.friendly_name.clone(),
nodes: creation.nodes.clone(), nodes: creation.nodes.clone(),
state: JobState::Waiting, state: JobState::Waiting,
last_message: None,
custom_message: None, custom_message: None,
}; };
@ -504,7 +488,6 @@ impl JobHandleInner {
pub fn create_job(&self, job_type: JobType, nodes: Vec<NodeName>) -> ColmenaResult<JobHandle> { pub fn create_job(&self, job_type: JobType, nodes: Vec<NodeName>) -> ColmenaResult<JobHandle> {
let job_id = JobId::new(); let job_id = JobId::new();
let creation = JobCreation { let creation = JobCreation {
friendly_name: None,
job_type, job_type,
nodes, nodes,
}; };

View file

@ -61,9 +61,6 @@ pub struct Deployment {
/// Handle to send messages to the ProgressOutput. /// Handle to send messages to the ProgressOutput.
progress: Option<ProgressSender>, progress: Option<ProgressSender>,
/// Names of the target nodes.
nodes: Vec<NodeName>,
/// Handles to the deployment targets. /// Handles to the deployment targets.
targets: HashMap<NodeName, TargetNode>, targets: HashMap<NodeName, TargetNode>,
@ -109,7 +106,6 @@ impl Deployment {
options: Options::default(), options: Options::default(),
nix_options: NixOptions::default(), nix_options: NixOptions::default(),
progress, progress,
nodes: targets.keys().cloned().collect(),
targets, targets,
parallelism_limit: ParallelismLimit::default(), parallelism_limit: ParallelismLimit::default(),
evaluation_node_limit: EvaluationNodeLimit::default(), evaluation_node_limit: EvaluationNodeLimit::default(),

View file

@ -30,7 +30,6 @@ pub struct Ssh {
/// Command to elevate privileges with. /// Command to elevate privileges with.
privilege_escalation_command: Vec<String>, privilege_escalation_command: Vec<String>,
friendly_name: String,
job: Option<JobHandle>, job: Option<JobHandle>,
} }
@ -100,13 +99,11 @@ impl Host for Ssh {
impl Ssh { impl Ssh {
pub fn new(user: String, host: String) -> Self { pub fn new(user: String, host: String) -> Self {
let friendly_name = host.clone();
Self { Self {
user, user,
host, host,
port: None, port: None,
ssh_config: None, ssh_config: None,
friendly_name,
privilege_escalation_command: Vec::new(), privilege_escalation_command: Vec::new(),
job: None, job: None,
} }