print connections status

This commit is contained in:
Evan Feenstra
2023-02-10 14:22:04 -08:00
parent 06043fa60d
commit b91ea599fd
2 changed files with 13 additions and 4 deletions

View File

@@ -18,13 +18,13 @@ docker rm -v $cid
### c-lightning
##### get the version
##### get the version
`git describe --tags --long --always --match='v*.*'`
and only take the last 8 chars of the last string
or
or
`docker run -it --entrypoint "/bin/bash" sphinx-cln`
@@ -40,4 +40,8 @@ docker push sphinxlightning/sphinx-cln-vls:0.1.4
##### testing
cargo run --bin sphinx-key-tester -- --log
cargo run --bin sphinx-key-tester -- --log
##### find pid
ps aux | grep -i sphinx-key-broker

View File

@@ -18,7 +18,7 @@ pub async fn run_test() -> rocket::Rocket<rocket::Build> {
let settings = Settings::default();
let (tx, rx) = mpsc::channel(1000);
let (status_tx, _status_rx) = mpsc::channel(1000);
let (status_tx, mut status_rx) = mpsc::channel(1000);
let (error_tx, error_rx) = broadcast::channel(1000);
crate::error_log::log_errors(error_rx);
@@ -27,6 +27,11 @@ pub async fn run_test() -> rocket::Rocket<rocket::Build> {
log::info!("BROKER started!");
// let mut connected = false;
// let tx_ = tx.clone();
tokio::spawn(async move {
while let Some(status) = status_rx.recv().await {
log::info!("========> CONNECTED! {}", status);
}
});
// tokio::spawn(async move {
// loop {
// tokio::select! {