delete old webxdc status updates during housekeeping

This commit is contained in:
B. Petersen
2023-07-22 00:30:14 +02:00
committed by link2xt
parent 5db75128ba
commit d572d960e5

View File

@@ -755,6 +755,17 @@ pub async fn housekeeping(context: &Context) -> Result<()> {
.log_err(context)
.ok();
context
.sql
.execute(
"DELETE FROM msgs_status_updates WHERE msg_id NOT IN (SELECT id FROM msgs)",
(),
)
.await
.context("failed to remove old webxdc status updates")
.log_err(context)
.ok();
info!(context, "Housekeeping done.");
Ok(())
}