| 620 | } |
| 621 | |
| 622 | pub async fn delete_queue_item(id: &Uuid) -> Result<(), Error> { |
| 623 | let ra = diesel::delete( |
| 624 | multicast_group_queue_item::dsl::multicast_group_queue_item.find(&fields::Uuid::from(id)), |
| 625 | ) |
| 626 | .execute(&mut get_async_db_conn().await?) |
| 627 | .await?; |
| 628 | if ra == 0 { |
| 629 | return Err(Error::NotFound(id.to_string())); |
| 630 | } |
| 631 | info!(id = %id, "Multicast-group queue item deleted"); |
| 632 | Ok(()) |
| 633 | } |
| 634 | |
| 635 | pub async fn flush_queue(multicast_group_id: &Uuid) -> Result<(), Error> { |
| 636 | let _ = diesel::delete( |