mirror of
https://github.com/chatmail/core.git
synced 2026-04-18 22:16:30 +03:00
feat: sort DNS results by successful connection timestamp (#5818)
This commit is contained in:
13
src/sql.rs
13
src/sql.rs
@@ -18,6 +18,8 @@ use crate::imex::BLOBS_BACKUP_NAME;
|
||||
use crate::location::delete_orphaned_poi_locations;
|
||||
use crate::log::LogExt;
|
||||
use crate::message::{Message, MsgId, Viewtype};
|
||||
use crate::net::dns::prune_dns_cache;
|
||||
use crate::net::prune_connection_history;
|
||||
use crate::param::{Param, Params};
|
||||
use crate::peerstate::Peerstate;
|
||||
use crate::stock_str;
|
||||
@@ -787,6 +789,17 @@ pub async fn housekeeping(context: &Context) -> Result<()> {
|
||||
.log_err(context)
|
||||
.ok();
|
||||
|
||||
prune_connection_history(context)
|
||||
.await
|
||||
.context("Failed to prune connection history")
|
||||
.log_err(context)
|
||||
.ok();
|
||||
prune_dns_cache(context)
|
||||
.await
|
||||
.context("Failed to prune DNS cache")
|
||||
.log_err(context)
|
||||
.ok();
|
||||
|
||||
// Delete POI locations
|
||||
// which don't have corresponding message.
|
||||
delete_orphaned_poi_locations(context)
|
||||
|
||||
Reference in New Issue
Block a user