mirror of
https://github.com/meilisearch/meilisearch.git
synced 2025-07-26 00:01:00 +00:00
Get rids of the unecessary tasks when an index_uid is specified
This commit is contained in:
@ -381,6 +381,24 @@ pub enum Kind {
|
||||
SnapshotCreation,
|
||||
}
|
||||
|
||||
impl Kind {
|
||||
pub fn related_to_one_index(&self) -> bool {
|
||||
match self {
|
||||
Kind::DocumentAdditionOrUpdate
|
||||
| Kind::DocumentDeletion
|
||||
| Kind::SettingsUpdate
|
||||
| Kind::IndexCreation
|
||||
| Kind::IndexDeletion
|
||||
| Kind::IndexUpdate => true,
|
||||
Kind::IndexSwap
|
||||
| Kind::TaskCancelation
|
||||
| Kind::TaskDeletion
|
||||
| Kind::DumpCreation
|
||||
| Kind::SnapshotCreation => false,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl FromStr for Kind {
|
||||
type Err = ResponseError;
|
||||
|
||||
|
Reference in New Issue
Block a user