Skip to content

Commit 3bec3b5

Browse files
author
Chris
committed
fix run command
1 parent 17adc7c commit 3bec3b5

1 file changed

Lines changed: 5 additions & 2 deletions

File tree

src/commands/project.rs

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,11 +33,13 @@ pub async fn handle_run(
3333
) -> Result<(), Box<dyn std::error::Error>> {
3434
gate_kubectl();
3535

36+
println!("Fetching project {}...", params.project.green());
3637
let project = client.get_project(&params.project).await?;
3738

39+
println!("Downloading kubeconfig for cluster {}...", project.cluster_name.green());
3840
// Save kubeconfig
3941
let kubeconfig = client
40-
.download_kubeconfig_file(&project.cluster_id.to_string())
42+
.download_kubeconfig_file(&project.cluster_name.to_string())
4143
.await?;
4244
let yaml = kubeconfig_to_yaml(&kubeconfig.kubeconfig)?;
4345
config.save_kubeconfig(yaml)?;
@@ -110,12 +112,13 @@ async fn wait_pod_ready(
110112
project_id: &str,
111113
pod_id: &str,
112114
) -> Result<Pod, CanineError> {
115+
println!();
113116
let frames = ['|', '/', '-', '\\'];
114117
for i in 1..=30 {
115118
print!("\r{}", frames[i % frames.len()]);
116119
io::stdout().flush().unwrap();
117120

118-
sleep(Duration::from_secs(1));
121+
sleep(Duration::from_millis(400));
119122
let pod = client.get_pod(project_id, pod_id).await?;
120123
if pod.status == ProcessStatus::Running {
121124
return Ok(pod);

0 commit comments

Comments
 (0)