connect_eligible_monitors

Function connect_eligible_monitors 

Source
async fn connect_eligible_monitors(
    config: &Tier2Config,
    pool: &PgPool,
    monitors: &mut HashMap<String, XlxMonitor>,
)
Expand description

Queries the database for tier2-eligible reflectors and connects monitors for any that are not already in the pool.

Respects the max_concurrent_monitors cap. Only connects to reflectors that have a valid IP address, tier2_available = true, and recent activity.