Skip to content

Commit

Permalink
Fix clean expire content error
Browse files Browse the repository at this point in the history
  • Loading branch information
chinuno-usami committed Dec 20, 2019
1 parent b201d16 commit e849a47
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions src/content.rs
Original file line number Diff line number Diff line change
Expand Up @@ -104,10 +104,13 @@ impl ContentInterface {
let date_num = date_string.parse::<u32>().unwrap();
debug!("date_num:{},cmp_num:{}", date_num, cmp_num);
if date_num >= cmp_num { continue; }
if let Some(rkv::Value::Json(_id)) = id {
// 从storage删除数据
debug!("del date:{}, id:{}", date_string, _id);
self.storage.del_single(&_id);
if let Some(rkv::Value::Json(ids)) = id {
let _ids: Vec::<String> = serde_json::from_str(ids).unwrap();
for _id in _ids{
// 从storage删除数据
debug!("del date:{}, id:{}", date_string, _id);
self.storage.del_single(&_id);
}
}
// 删除自己
index_to_delete.push(date_string);
Expand Down

0 comments on commit e849a47

Please sign in to comment.