async fn check_and_notify(pagerduty: &PagerDuty, hue: &Hue) {
    if pagerduty.get_incidents_count() > 0 {
        info!("New PagerDuty incident triggered!");
        match hue.alert(pagerduty.color) {
            Ok(_) => (),
            Err(e) => error!("Notification error: {}", e),
        };
    } else {
        debug!("No new triggered incident");
    }
}
/// Check for new events and show notifications.
Check for new events and show notifications.
Check for new events and show notifications .
async fn check_and_notify(pagerduty: &PagerDuty, hue: &Hue) {
    if pagerduty.get_incidents_count() > 0 {
        info!("New PagerDuty incident triggered!");
        match hue.alert(pagerduty.color) {
            Ok(_) => (),
            Err(e) => error!("Notification error: {}", e),
        };
    } else {
        debug!("No new triggered incident");
    }
}
async fn check_and_notify ( pagerduty : & PagerDuty , hue : & Hue ) { if pagerduty . get_incidents_count ( ) > 0 { info ! ( " " ) ; match hue . alert ( pagerduty . color ) { Ok ( _ ) => ( ) , Err ( e ) => error ! ( " " e ) , } ; } else { debug ! ( " " ) ; } }
Check for new events and show notifications.
Check for new events and show notifications .
pagerduty
&PagerDuty
hue
&Hue