mirror of
https://forgejo.ellis.link/continuwuation/continuwuity.git
synced 2026-11-15 21:26:50 +00:00
Improve tracing spans for notif counts and sliding-sync exts.
Signed-off-by: Jason Volk <jason@zemos.net>
This commit is contained in:
1 parent
7cbc2ee385
commit
e53968d9eb
7 files changed
+10
-5
No files matched your search
@@ -35,6 +35,7 @@ impl crate::Service for Service {
|
||||
}
|
||||
|
||||
#[implement(Service)]
|
||||
#[tracing::instrument(level = "debug", skip(self))]
|
||||
pub fn reset_notification_counts(&self, user_id: &UserId, room_id: &RoomId) {
|
||||
let count = self.services.globals.next_count();
|
||||
|
||||
@@ -53,6 +54,7 @@ pub fn reset_notification_counts(&self, user_id: &UserId, room_id: &RoomId) {
|
||||
}
|
||||
|
||||
#[implement(Service)]
|
||||
#[tracing::instrument(level = "debug", skip(self), ret)]
|
||||
pub async fn notification_count(&self, user_id: &UserId, room_id: &RoomId) -> u64 {
|
||||
let key = (user_id, room_id);
|
||||
self.db
|
||||
@@ -64,6 +66,7 @@ pub async fn notification_count(&self, user_id: &UserId, room_id: &RoomId) -> u6
|
||||
}
|
||||
|
||||
#[implement(Service)]
|
||||
#[tracing::instrument(level = "debug", skip(self), ret)]
|
||||
pub async fn highlight_count(&self, user_id: &UserId, room_id: &RoomId) -> u64 {
|
||||
let key = (user_id, room_id);
|
||||
self.db
|
||||
@@ -75,6 +78,7 @@ pub async fn highlight_count(&self, user_id: &UserId, room_id: &RoomId) -> u64 {
|
||||
}
|
||||
|
||||
#[implement(Service)]
|
||||
#[tracing::instrument(level = "debug", skip(self), ret)]
|
||||
pub async fn last_notification_read(&self, user_id: &UserId, room_id: &RoomId) -> u64 {
|
||||
let key = (room_id, user_id);
|
||||
self.db
|
||||
|
||||
Reference in new issue
Block a user