Skip to content
This repository has been archived by the owner on May 6, 2022. It is now read-only.

Commit

Permalink
Add config log at startup
Browse files Browse the repository at this point in the history
  • Loading branch information
ufoscout committed Jul 9, 2018
1 parent 8fe34f7 commit f13fc66
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 6 deletions.
8 changes: 4 additions & 4 deletions wait/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions wait/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
[package]
name = "wait"
version = "2.2.0"
version = "2.3.0"
authors = ["ufoscout <[email protected]>"]

[dependencies]

[dev-dependencies]
time = "0.1.39"
time = "0.1.40"
atomic-counter = "0.1.0"
8 changes: 8 additions & 0 deletions wait/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,14 @@ pub struct Config {

pub fn wait(sleep: &sleeper::Sleeper, config: &Config, on_timeout : &mut FnMut() ) {

println!("Docker-compose-wait starting with configuration:");
println!("------------------------------------------------");
println!(" - Hosts to be waiting for: [{}]", config.hosts);
println!(" - Timeout before failure: {} seconds ", config.timeout);
println!(" - Sleeping time before checking for hosts availability: {} seconds", config.wait_before);
println!(" - Sleeping time once all hosts are available: {} seconds", config.wait_after);
println!("------------------------------------------------");

if config.wait_before > 0 {
println!("Waiting {} seconds before checking for hosts availability", config.wait_before);
sleep.sleep(config.wait_before);
Expand Down

0 comments on commit f13fc66

Please sign in to comment.