UZXIRPR3NPWWFX7R2PB7TI2GPHH6XYQWCY5IOFZ2ALHGSWGYI37AC
host: String,
path: String,
mut leader: Receiver<String>,
pool: Arc<Mutex<Option<tokio_postgres::Client>>>,
process_lock: Arc<Mutex<()>>,
) {
loop {
match race_(
host.clone(),
path.clone(),
leader.clone(),
pool.clone(),
process_lock.clone(),
)
.await
{
Ok(()) => {
error!("race stopped")
}
Err(e) => {
error!("race_ error {:?}", e);
}
}
tokio::time::sleep(std::time::Duration::from_secs(1)).await;
}
}
async fn race_(