fix regex, add debug
continuous-integration/drone/push Build is failing Details
continuous-integration/drone/pr Build was killed Details

This commit is contained in:
Alex 2023-04-21 13:55:59 +02:00
parent fb7fde4b09
commit 6d0cb99b99
1 changed files with 2 additions and 1 deletions

View File

@ -33,7 +33,7 @@ pub fn watch_autodiscovered_ips(
tokio::spawn(async move {
let mut last_index = None;
let re = Regex::new(r".*autodiscovery/(\w+)/(\w+)$").unwrap();
let re = Regex::new(r".*autodiscovery/(ipv[46])/([^/]+)$").unwrap();
while !*must_exit.borrow() {
let r = select! {
@ -66,6 +66,7 @@ pub fn watch_autodiscovered_ips(
}
}
debug!("Autodiscovered addresses fetched from Consul: {:?}", addresses);
if tx.send(Arc::new(addresses)).is_err() {
info!("Autodiscovered addresses watcher terminating");
}