mirror of
https://forgejo.ellis.link/continuwuation/continuwuity.git
synced 2025-09-10 18:22:49 +02:00
move more backfill log to info, clean up imports
This commit is contained in:
parent
0e6b7f6d5f
commit
a0bde96494
1 changed files with 6 additions and 8 deletions
|
@ -1,13 +1,13 @@
|
||||||
use std::iter::once;
|
use std::iter::once;
|
||||||
|
|
||||||
use conduwuit_core::{
|
use conduwuit_core::{
|
||||||
Result, debug, debug_warn, implement, info,
|
Result, debug, implement, info,
|
||||||
matrix::{
|
matrix::{
|
||||||
event::Event,
|
event::Event,
|
||||||
pdu::{PduCount, PduId, RawPduId},
|
pdu::{PduCount, PduId, RawPduId},
|
||||||
},
|
},
|
||||||
utils::{IterStream, ReadyExt},
|
utils::{IterStream, ReadyExt},
|
||||||
validated, warn,
|
validated,
|
||||||
};
|
};
|
||||||
use futures::{FutureExt, StreamExt};
|
use futures::{FutureExt, StreamExt};
|
||||||
use ruma::{
|
use ruma::{
|
||||||
|
@ -15,9 +15,7 @@ use ruma::{
|
||||||
api::federation,
|
api::federation,
|
||||||
events::{
|
events::{
|
||||||
StateEventType, TimelineEventType, room::power_levels::RoomPowerLevelsEventContent,
|
StateEventType, TimelineEventType, room::power_levels::RoomPowerLevelsEventContent,
|
||||||
},
|
}, UInt};
|
||||||
uint,
|
|
||||||
};
|
|
||||||
use serde_json::value::RawValue as RawJsonValue;
|
use serde_json::value::RawValue as RawJsonValue;
|
||||||
|
|
||||||
use super::ExtractBody;
|
use super::ExtractBody;
|
||||||
|
@ -109,7 +107,7 @@ pub async fn backfill_if_required(&self, room_id: &RoomId, from: PduCount) -> Re
|
||||||
federation::backfill::get_backfill::v1::Request {
|
federation::backfill::get_backfill::v1::Request {
|
||||||
room_id: room_id.to_owned(),
|
room_id: room_id.to_owned(),
|
||||||
v: vec![first_pdu.1.event_id().to_owned()],
|
v: vec![first_pdu.1.event_id().to_owned()],
|
||||||
limit: uint!(100),
|
limit: UInt::from(self.services.server.config.max_fetch_prev_events),
|
||||||
},
|
},
|
||||||
)
|
)
|
||||||
.await;
|
.await;
|
||||||
|
@ -117,13 +115,13 @@ pub async fn backfill_if_required(&self, room_id: &RoomId, from: PduCount) -> Re
|
||||||
| Ok(response) => {
|
| Ok(response) => {
|
||||||
for pdu in response.pdus {
|
for pdu in response.pdus {
|
||||||
if let Err(e) = self.backfill_pdu(backfill_server, pdu).boxed().await {
|
if let Err(e) = self.backfill_pdu(backfill_server, pdu).boxed().await {
|
||||||
debug_warn!("Failed to add backfilled pdu in room {room_id}: {e}");
|
info!("Failed to add backfilled pdu in room {room_id}: {e}");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return Ok(());
|
return Ok(());
|
||||||
},
|
},
|
||||||
| Err(e) => {
|
| Err(e) => {
|
||||||
warn!("{backfill_server} failed to provide backfill for room {room_id}: {e}");
|
info!("{backfill_server} failed to provide backfill for room {room_id}: {e}");
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue