mirror of
https://github.com/Noratrieb/haesli.git
synced 2026-01-15 04:05:03 +01:00
improve dashboard startup
This commit is contained in:
parent
08fa9163b8
commit
2fe3b4b77b
3 changed files with 27 additions and 19 deletions
|
|
@ -3,7 +3,7 @@
|
|||
use anyhow::Result;
|
||||
use clap::Parser;
|
||||
use std::str::FromStr;
|
||||
use tracing::{info, info_span, Instrument};
|
||||
use tracing::info;
|
||||
use tracing_subscriber::{layer::SubscriberExt, util::SubscriberInitExt, EnvFilter, Registry};
|
||||
|
||||
/// An AMQP 0-9-1 broker implementation.
|
||||
|
|
@ -28,11 +28,7 @@ async fn main() -> Result<()> {
|
|||
|
||||
if args.dashboard {
|
||||
let global_data = global_data.clone();
|
||||
tokio::spawn(async move {
|
||||
amqp_dashboard::dashboard(global_data)
|
||||
.instrument(info_span!("dashboard"))
|
||||
.await
|
||||
});
|
||||
tokio::spawn(async move { amqp_dashboard::start_dashboard(global_data).await });
|
||||
}
|
||||
|
||||
let res = amqp_transport::do_thing_i_guess(global_data, terminate()).await;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue