fix datastore
This commit is contained in:
parent
0938a8fbe5
commit
055b2e196a
2 changed files with 8 additions and 4 deletions
|
|
@ -348,7 +348,11 @@ impl DatastoreUser {
|
|||
}
|
||||
|
||||
#[instrument]
|
||||
async fn init_object_rating_slot(&self, data_id: i64, rating_param: RatingInitParamWithSlot) {
|
||||
async fn init_object_rating_slot(
|
||||
&self,
|
||||
data_id: i64,
|
||||
rating_param: RatingInitParamWithSlot,
|
||||
) -> Result<(), ErrorCode> {
|
||||
info!("running init object rating slot");
|
||||
sqlx::query!(
|
||||
r#"
|
||||
|
|
@ -843,7 +847,7 @@ impl DataStore for DatastoreUser {
|
|||
for rating_param in &postparam.rating_init_params {
|
||||
info!("running init params");
|
||||
self.init_object_rating_slot(data_id, rating_param.clone())
|
||||
.await
|
||||
.await?;
|
||||
}
|
||||
|
||||
let key = format!("data/{}.bin", data_id);
|
||||
|
|
@ -1299,7 +1303,7 @@ impl DataStore for DatastoreUser {
|
|||
for rating_param in ¶m.post_param.rating_init_params {
|
||||
info!("running init params");
|
||||
self.init_object_rating_slot(data_id, rating_param.clone())
|
||||
.await
|
||||
.await?;
|
||||
}
|
||||
|
||||
let key = format!("data/{}.jpg", data_id);
|
||||
|
|
|
|||
|
|
@ -353,7 +353,7 @@ pub async fn with_setup(f: impl AsyncFnOnce() -> anyhow::Result<()>) {
|
|||
.with(tracing_subscriber::fmt::layer().with_filter(
|
||||
tracing_subscriber::filter::FilterFn::new(|m| {
|
||||
!m.module_path().is_some_and(|m| {
|
||||
(m.starts_with("h2") | m.starts_with("reqwest") | m.starts_with("hyper_util"))
|
||||
m.starts_with("h2") | m.starts_with("reqwest") | m.starts_with("hyper_util")
|
||||
}) || (*m.level() <= Level::INFO)
|
||||
}),
|
||||
))
|
||||
|
|
|
|||
Loading…
Reference in a new issue