MCPcopy Create free account
hub / github.com/chirpstack/chirpstack / delete_item

Function delete_item

chirpstack/src/storage/device_queue.rs:102–112  ·  view source on GitHub ↗
(id: &Uuid)

Source from the content-addressed store, hash-verified

100}
101
102pub async fn delete_item(id: &Uuid) -> Result<(), Error> {
103 let ra =
104 diesel::delete(device_queue_item::dsl::device_queue_item.find(&fields::Uuid::from(id)))
105 .execute(&mut get_async_db_conn().await?)
106 .await?;
107 if ra == 0 {
108 return Err(Error::NotFound(id.to_string()));
109 }
110 info!(id = %id, "Device queue-item deleted");
111 Ok(())
112}
113
114/// It returns the device queue-item and a bool indicating if there are more items in the queue.
115pub async fn get_next_for_dev_eui(dev_eui: &EUI64) -> Result<(DeviceQueueItem, bool), Error> {

Callers 4

test_queue_itemFunction · 0.85
handle_uplink_ackMethod · 0.85

Calls 3

to_stringMethod · 0.80
deleteFunction · 0.70
get_async_db_connFunction · 0.70

Tested by 1

test_queue_itemFunction · 0.68