daily logging improvements

Signed-off-by: Jason Volk <jason@zemos.net>
This commit is contained in:
Jason Volk 2024-04-27 12:58:56 -07:00 committed by June
parent 8ecf722abb
commit b19d2ad5b0
2 changed files with 5 additions and 5 deletions

View File

@ -30,6 +30,7 @@ impl Service {
.filter_map(move |sid| services().rooms.short.get_eventid_from_short(sid).ok()))
}
#[tracing::instrument(skip_all)]
pub(crate) async fn get_auth_chain(&self, room_id: &RoomId, starting_events: &[&EventId]) -> Result<Vec<u64>> {
const NUM_BUCKETS: usize = 50; //TODO: change possible w/o disrupting db?
const BUCKET: BTreeSet<(u64, &EventId)> = BTreeSet::new();

View File

@ -6,10 +6,9 @@ use ruma::{
OwnedRoomId, OwnedUserId, RoomId, UserId,
};
use tokio::sync::{broadcast, RwLock};
use tracing::debug;
use crate::{
services,
debug_info, services,
utils::{self, user_id::user_is_local},
Result,
};
@ -26,7 +25,7 @@ impl Service {
/// Sets a user as typing until the timeout timestamp is reached or
/// roomtyping_remove is called.
pub(crate) async fn typing_add(&self, user_id: &UserId, room_id: &RoomId, timeout: u64) -> Result<()> {
debug!("typing add {:?} in {:?} timeout:{:?}", user_id, room_id, timeout);
debug_info!("typing started {:?} in {:?} timeout:{:?}", user_id, room_id, timeout);
// update clients
self.typing
.write()
@ -50,7 +49,7 @@ impl Service {
/// Removes a user from typing before the timeout is reached.
pub(crate) async fn typing_remove(&self, user_id: &UserId, room_id: &RoomId) -> Result<()> {
debug!("typing remove {:?} in {:?}", user_id, room_id);
debug_info!("typing stopped {:?} in {:?}", user_id, room_id);
// update clients
self.typing
.write()
@ -107,7 +106,7 @@ impl Service {
let typing = &mut self.typing.write().await;
let room = typing.entry(room_id.to_owned()).or_default();
for user in &removable {
debug!("typing maintain remove {:?} in {:?}", &user, room_id);
debug_info!("typing timeout {:?} in {:?}", &user, room_id);
room.remove(user);
}
// update clients