Session persistence

This commit is contained in:
Igor Katson 2023-11-25 02:36:19 +00:00
parent e467787c38
commit bec5e1be7f
No known key found for this signature in database
GPG key ID: B4EC22B66D61A3F5
7 changed files with 204 additions and 51 deletions

View file

@ -1,7 +1,7 @@
use tracing::{debug, trace, warn, Instrument};
pub fn spawn(
name: &str,
_name: &str,
span: tracing::Span,
fut: impl std::future::Future<Output = anyhow::Result<()>> + Send + 'static,
) -> tokio::task::JoinHandle<()> {
@ -17,7 +17,7 @@ pub fn spawn(
}
}
.instrument(span.or_current());
tokio::task::Builder::new().name(name).spawn(fut).unwrap()
tokio::task::spawn(fut)
}
#[derive(Clone, Copy, Debug)]