@@ -5,7 +5,14 @@ use std::{
|
||||
time::{Instant, SystemTime},
|
||||
};
|
||||
|
||||
use conduwuit::{
|
||||
use futures::{FutureExt, StreamExt, TryStreamExt};
|
||||
use ruma::{
|
||||
CanonicalJsonObject, CanonicalJsonValue, EventId, OwnedEventId, OwnedRoomId,
|
||||
OwnedRoomOrAliasId, OwnedServerName, RoomId, RoomVersionId,
|
||||
api::federation::event::get_room_state,
|
||||
};
|
||||
use tracing_subscriber::EnvFilter;
|
||||
use tuwunel_core::{
|
||||
Err, Result, debug_error, err, info,
|
||||
matrix::pdu::{PduEvent, PduId, RawPduId},
|
||||
trace, utils,
|
||||
@@ -15,17 +22,10 @@ use conduwuit::{
|
||||
},
|
||||
warn,
|
||||
};
|
||||
use futures::{FutureExt, StreamExt, TryStreamExt};
|
||||
use ruma::{
|
||||
CanonicalJsonObject, CanonicalJsonValue, EventId, OwnedEventId, OwnedRoomId,
|
||||
OwnedRoomOrAliasId, OwnedServerName, RoomId, RoomVersionId,
|
||||
api::federation::event::get_room_state,
|
||||
};
|
||||
use service::rooms::{
|
||||
use tuwunel_service::rooms::{
|
||||
short::{ShortEventId, ShortRoomId},
|
||||
state_compressor::HashSetCompressStateEvent,
|
||||
};
|
||||
use tracing_subscriber::EnvFilter;
|
||||
|
||||
use crate::admin_command;
|
||||
|
||||
@@ -764,7 +764,7 @@ pub(super) async fn memory_stats(&self, opts: Option<String>) -> Result {
|
||||
})
|
||||
.collect();
|
||||
|
||||
let stats = conduwuit::alloc::memory_stats(&opts).unwrap_or_default();
|
||||
let stats = tuwunel_core::alloc::memory_stats(&opts).unwrap_or_default();
|
||||
|
||||
self.write_str("```\n").await?;
|
||||
self.write_str(&stats).await?;
|
||||
@@ -902,7 +902,7 @@ pub(super) async fn database_files(&self, map: Option<String>, level: Option<i32
|
||||
|
||||
#[admin_command]
|
||||
pub(super) async fn trim_memory(&self) -> Result {
|
||||
conduwuit::alloc::trim(None)?;
|
||||
tuwunel_core::alloc::trim(None)?;
|
||||
|
||||
writeln!(self, "done").await
|
||||
}
|
||||
|
||||
@@ -2,9 +2,9 @@ mod commands;
|
||||
pub(crate) mod tester;
|
||||
|
||||
use clap::Subcommand;
|
||||
use conduwuit::Result;
|
||||
use ruma::{OwnedEventId, OwnedRoomId, OwnedRoomOrAliasId, OwnedServerName};
|
||||
use service::rooms::short::{ShortEventId, ShortRoomId};
|
||||
use tuwunel_core::Result;
|
||||
use tuwunel_service::rooms::short::{ShortEventId, ShortRoomId};
|
||||
|
||||
use self::tester::TesterCommand;
|
||||
use crate::admin_command_dispatch;
|
||||
@@ -32,13 +32,13 @@ pub(super) enum DebugCommand {
|
||||
/// the command.
|
||||
ParsePdu,
|
||||
|
||||
/// - Retrieve and print a PDU by EventID from the conduwuit database
|
||||
/// - Retrieve and print a PDU by EventID from the tuwunel database
|
||||
GetPdu {
|
||||
/// An event ID (a $ followed by the base64 reference hash)
|
||||
event_id: OwnedEventId,
|
||||
},
|
||||
|
||||
/// - Retrieve and print a PDU by PduId from the conduwuit database
|
||||
/// - Retrieve and print a PDU by PduId from the tuwunel database
|
||||
GetShortPdu {
|
||||
/// Shortroomid integer
|
||||
shortroomid: ShortRoomId,
|
||||
@@ -179,7 +179,7 @@ pub(super) enum DebugCommand {
|
||||
server_name: OwnedServerName,
|
||||
},
|
||||
|
||||
/// - Runs a server name through conduwuit's true destination resolution
|
||||
/// - Runs a server name through tuwunel's true destination resolution
|
||||
/// process
|
||||
///
|
||||
/// Useful for debugging well-known issues
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
use conduwuit::{Err, Result};
|
||||
use tuwunel_core::{Err, Result};
|
||||
|
||||
use crate::{admin_command, admin_command_dispatch};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user