improvement: flush after every request that manipulates the db
This commit is contained in:
parent
b2a1505535
commit
6dbe195695
30 changed files with 216 additions and 105 deletions
|
@ -13,7 +13,7 @@ use std::{collections::BTreeMap, time::SystemTime};
|
|||
feature = "conduit_bin",
|
||||
post("/_matrix/client/r0/rooms/<_>/read_markers", data = "<body>")
|
||||
)]
|
||||
pub fn set_read_marker_route(
|
||||
pub async fn set_read_marker_route(
|
||||
db: State<'_, Database>,
|
||||
body: Ruma<set_read_marker::Request<'_>>,
|
||||
) -> ConduitResult<set_read_marker::Response> {
|
||||
|
@ -71,5 +71,8 @@ pub fn set_read_marker_route(
|
|||
&db.globals,
|
||||
)?;
|
||||
}
|
||||
|
||||
db.flush().await?;
|
||||
|
||||
Ok(set_read_marker::Response.into())
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue