mirror of
https://github.com/meilisearch/meilisearch.git
synced 2024-11-26 12:05:05 +08:00
rebase on index-scheduler
This commit is contained in:
parent
e0221fc0a3
commit
d0e91555d1
@ -21,6 +21,7 @@ meilisearch-types = { path = "../meilisearch-types" }
|
||||
http = "0.2.8"
|
||||
regex = "1.6.0"
|
||||
lazy_static = "1.4.0"
|
||||
roaring = { version = "0.10.0", features = ["serde"] }
|
||||
|
||||
[dev-dependencies]
|
||||
big_s = "1.0.2"
|
||||
|
@ -4,6 +4,7 @@ use meilisearch_types::{
|
||||
settings::Unchecked,
|
||||
tasks::{Details, KindWithContent, Status, Task, TaskId},
|
||||
};
|
||||
use roaring::RoaringBitmap;
|
||||
use serde::{Deserialize, Serialize};
|
||||
use time::OffsetDateTime;
|
||||
|
||||
@ -115,7 +116,7 @@ pub enum KindDump {
|
||||
},
|
||||
DeleteTasks {
|
||||
query: String,
|
||||
tasks: Vec<TaskId>,
|
||||
tasks: RoaringBitmap,
|
||||
},
|
||||
DumpExport {
|
||||
dump_uid: String,
|
||||
@ -177,7 +178,9 @@ impl From<KindWithContent> for KindDump {
|
||||
}
|
||||
KindWithContent::IndexSwap { lhs, rhs } => KindDump::IndexSwap { lhs, rhs },
|
||||
KindWithContent::CancelTask { tasks } => KindDump::CancelTask { tasks },
|
||||
KindWithContent::DeleteTasks { query, tasks } => KindDump::DeleteTasks { query, tasks },
|
||||
KindWithContent::TaskDeletion { query, tasks } => {
|
||||
KindDump::DeleteTasks { query, tasks }
|
||||
}
|
||||
KindWithContent::DumpExport { dump_uid, .. } => KindDump::DumpExport { dump_uid },
|
||||
KindWithContent::Snapshot => KindDump::Snapshot,
|
||||
}
|
||||
|
@ -480,7 +480,7 @@ impl IndexScheduler {
|
||||
KindDump::IndexSwap { lhs, rhs } => KindWithContent::IndexSwap { lhs, rhs },
|
||||
KindDump::CancelTask { tasks } => KindWithContent::CancelTask { tasks },
|
||||
KindDump::DeleteTasks { query, tasks } => {
|
||||
KindWithContent::DeleteTasks { query, tasks }
|
||||
KindWithContent::TaskDeletion { query, tasks }
|
||||
}
|
||||
KindDump::DumpExport { dump_uid } => KindWithContent::DumpExport {
|
||||
dump_uid,
|
||||
|
@ -14,3 +14,4 @@ sha2 = "0.10.6"
|
||||
thiserror = "1.0.37"
|
||||
time = { version = "0.3.15", features = ["serde-well-known", "formatting", "parsing", "macros"] }
|
||||
uuid = { version = "1.1.2", features = ["serde", "v4"] }
|
||||
roaring = { version = "0.10.0", features = ["serde"] }
|
||||
|
@ -18,7 +18,7 @@ pub enum AuthControllerError {
|
||||
}
|
||||
|
||||
internal_error!(
|
||||
AuthControllerError: milli::heed::Error,
|
||||
AuthControllerError: meilisearch_types::milli::heed::Error,
|
||||
std::io::Error,
|
||||
serde_json::Error,
|
||||
std::str::Utf8Error
|
||||
|
@ -11,6 +11,7 @@ use std::sync::Arc;
|
||||
|
||||
use hmac::{Hmac, Mac};
|
||||
use meilisearch_types::keys::KeyId;
|
||||
use meilisearch_types::milli;
|
||||
use meilisearch_types::star_or::StarOr;
|
||||
use meilisearch_types::milli;
|
||||
use milli::heed::types::{ByteSlice, DecodeIgnore, SerdeJson};
|
||||
|
@ -87,7 +87,7 @@ impl Task {
|
||||
| KindWithContent::IndexUpdate { .. }
|
||||
| KindWithContent::IndexSwap { .. }
|
||||
| KindWithContent::CancelTask { .. }
|
||||
| KindWithContent::DeleteTasks { .. }
|
||||
| KindWithContent::TaskDeletion { .. }
|
||||
| KindWithContent::DumpExport { .. }
|
||||
| KindWithContent::Snapshot => None,
|
||||
}
|
||||
@ -250,7 +250,7 @@ impl From<&KindWithContent> for Option<Details> {
|
||||
}),
|
||||
KindWithContent::IndexSwap { .. } => None,
|
||||
KindWithContent::CancelTask { .. } => None,
|
||||
KindWithContent::DeleteTasks { .. } => todo!(),
|
||||
KindWithContent::TaskDeletion { .. } => todo!(),
|
||||
KindWithContent::DumpExport { dump_uid, .. } => Some(Details::Dump {
|
||||
dump_uid: dump_uid.clone(),
|
||||
}),
|
||||
|
Loading…
Reference in New Issue
Block a user