Skip to content

Commit bd5cfd9

Browse files
committed
add: messages when starting/stopping containers
1 parent de1f32b commit bd5cfd9

File tree

7 files changed

+13
-5
lines changed

7 files changed

+13
-5
lines changed

Cargo.lock

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "rooz"
3-
version = "0.96.0"
3+
version = "0.97.0"
44
edition = "2021"
55

66
[dependencies]

src/api/workspace/config.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@ use crate::{
1010
config::{ConfigSource, FileFormat, RoozCfg},
1111
runtime::RuntimeConfig,
1212
},
13-
util::labels::{self, Labels},
1413
model::{types::AnyError, volume::WORK_ROLE},
14+
util::labels::{self, Labels},
1515
};
1616

1717
use colored::Colorize;

src/api/workspace/enter.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@ use crate::{
44
api::WorkspaceApi,
55
config::runtime::RuntimeConfig,
66
constants,
7-
util::labels::{self, Labels},
87
model::{types::AnyError, volume::RoozVolume},
8+
util::labels::{self, Labels},
99
};
1010

1111
impl<'a> WorkspaceApi<'a> {

src/api/workspace/remove.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ use crate::{
1010
util::{
1111
crypt,
1212
labels::{Labels, ROLE},
13-
ssh
13+
ssh,
1414
},
1515
};
1616

src/api/workspace/start.rs

+4
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,14 @@
11
use crate::{api::WorkspaceApi, model::types::AnyError, util::labels::Labels};
2+
use colored::Colorize;
23

34
impl<'a> WorkspaceApi<'a> {
45
pub async fn start_workspace(&self, workspace_key: &str) -> Result<(), AnyError> {
56
let labels = Labels::new(Some(workspace_key), None);
7+
68
for c in self.api.container.get_all(&labels).await? {
9+
print!("Starting container: {} ... ", c.names.unwrap().join(", "));
710
self.api.container.start(&c.id.unwrap()).await?;
11+
println!("{}", format!("OK").green())
812
}
913
Ok(())
1014
}

src/api/workspace/stop.rs

+4
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,14 @@
1+
use colored::Colorize;
2+
13
use crate::{api::WorkspaceApi, model::types::AnyError, util::labels::Labels};
24

35
impl<'a> WorkspaceApi<'a> {
46
pub async fn stop(&self, workspace_key: &str) -> Result<(), AnyError> {
57
let labels = Labels::new(Some(workspace_key), None);
68
for c in self.api.container.get_all(&labels).await? {
9+
print!("Stopping container: {} ... ", c.names.unwrap().join(", "));
710
self.api.container.stop(&c.id.unwrap()).await?;
11+
println!("{}", format!("OK").green())
812
}
913
Ok(())
1014
}

0 commit comments

Comments
 (0)