mirror of
https://github.com/chatmail/core.git
synced 2026-04-28 19:06:35 +03:00
name spawned tasks in core
This commit is contained in:
@@ -24,7 +24,6 @@ use rand::Rng;
|
||||
use ratelimit::Ratelimit;
|
||||
use url::Url;
|
||||
|
||||
use crate::chat::{self, ChatId, ChatIdBlocked};
|
||||
use crate::chatlist_events;
|
||||
use crate::config::Config;
|
||||
use crate::constants::{self, Blocked, Chattype, ShowEmails};
|
||||
@@ -48,6 +47,10 @@ use crate::scheduler::connectivity::ConnectivityStore;
|
||||
use crate::sql;
|
||||
use crate::stock_str;
|
||||
use crate::tools::{self, create_id, duration_to_str};
|
||||
use crate::{
|
||||
chat::{self, ChatId, ChatIdBlocked},
|
||||
spawn_named_task,
|
||||
};
|
||||
|
||||
pub(crate) mod capabilities;
|
||||
mod client;
|
||||
@@ -1556,7 +1559,9 @@ impl Session {
|
||||
} else if !context.push_subscriber.heartbeat_subscribed().await {
|
||||
let context = context.clone();
|
||||
// Subscribe for heartbeat notifications.
|
||||
tokio::spawn(async move { context.push_subscriber.subscribe(&context).await });
|
||||
spawn_named_task!("subscribe_to_heartbeat_notifications", async move {
|
||||
context.push_subscriber.subscribe(&context).await
|
||||
});
|
||||
}
|
||||
|
||||
Ok(())
|
||||
|
||||
Reference in New Issue
Block a user