feat(blog::refresh) add hash check to boost idx speed

This commit is contained in:
lumither committed 2024-07-21 01:12:15 +08:00
1 parent de27479242
commit 0864f0b950
15 files changed
+426 -199

No files matched your search

+61
View File
@@ -0,0 +1,61 @@
use thiserror::Error;
#[derive(Error, Debug)]
pub enum PostIdxError {
#[error("Failed to parse UUID <{}>: {}", id, err_msg)]
InvalidUUID { id: String, err_msg: String },
#[error(
"Failed to parse `last update time` for <{}> when creating post index: {}",
id,
err_msg
)]
InvalidLastUpdate { id: String, err_msg: String },
#[error(
"Failed to parse `first update time` for <{}> when creating post index: {}",
id,
err_msg
)]
InvalidFirstUpdate { id: String, err_msg: String },
#[error(
"Failed to parse `tag` for <{}> when creating post index: <{}>: {}",
id,
invalid_string,
err_msg
)]
InvalidTagString {
id: String,
invalid_string: String,
err_msg: String,
},
#[error(
"Database error on writing `{}` to table `{}`: <{}>: {}",
data_desc,
db_table,
id,
err_msg
)]
DBWriteFailure {
data_desc: String,
db_table: String,
id: String,
err_msg: String,
},
#[error(
"Database error on Reading `{}` to table `{}`: <{}>: {}",
data_desc,
db_table,
id,
err_msg
)]
DBReadFailure {
data_desc: String,
db_table: String,
id: String,
err_msg: String,
},
}