pub async fn bulk_update_alert_status(
pool: &Pool<MySql>,
ids: Option<Vec<i64>>,
service: Option<&str>,
app_id: Option<i64>,
new_status: &str,
user_id: i64,
notes: Option<&str>,
) -> Result<i64>
Expand description
Bulk updates the status of multiple alerts.
This function changes the status of multiple alerts at once based on provided criteria, which is useful for operations like resolving all alerts for a specific service or application.
§Arguments
pool
- Database connection pool for executing the queryids
- Optional vector of alert IDs to updateservice
- Optional service name to filter alertsapp_id
- Optional application ID to filter alertsnew_status
- Status to set for matching alertsuser_id
- ID of the user performing the bulk updatenotes
- Optional notes about the bulk update
§Returns
Ok(i64)
- Number of alerts updatedErr(anyhow::Error)
- Failed to update alerts