add tokio-console support

This commit is contained in:
nora 2022-02-20 22:03:39 +01:00
parent f2195133fb
commit ab736984cc
6 changed files with 456 additions and 18 deletions

View file

@ -8,7 +8,6 @@ mod sasl;
#[cfg(test)]
mod tests;
use crate::connection::Connection;
use amqp_core::GlobalData;
use anyhow::Result;
@ -39,6 +38,8 @@ pub async fn do_thing_i_guess(global_data: GlobalData) -> Result<()> {
let connection = Connection::new(id, stream, connection_handle, global_data.clone());
tokio::spawn(connection.start_connection_processing().instrument(span));
tokio::task::Builder::new()
.name(&format!("connection {id}"))
.spawn(connection.start_connection_processing().instrument(span));
}
}