mirror of
https://github.com/meilisearch/MeiliSearch
synced 2025-07-03 20:07:09 +02:00
Add BatchReason::TaskKindCannotBeBatched
This commit is contained in:
parent
b73660fa8e
commit
f8ff91ed30
1 changed files with 6 additions and 0 deletions
|
@ -683,6 +683,9 @@ pub enum BatchStopReason {
|
||||||
kind: Kind,
|
kind: Kind,
|
||||||
id: TaskId,
|
id: TaskId,
|
||||||
},
|
},
|
||||||
|
TaskKindCannotBeBatched {
|
||||||
|
kind: Kind,
|
||||||
|
},
|
||||||
ExhaustedEnqueuedTasks,
|
ExhaustedEnqueuedTasks,
|
||||||
ExhaustedEnqueuedTasksForIndex {
|
ExhaustedEnqueuedTasksForIndex {
|
||||||
index: String,
|
index: String,
|
||||||
|
@ -742,6 +745,9 @@ impl Display for BatchStopReason {
|
||||||
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
||||||
match self {
|
match self {
|
||||||
BatchStopReason::Unspecified => f.write_str("unspecified"),
|
BatchStopReason::Unspecified => f.write_str("unspecified"),
|
||||||
|
BatchStopReason::TaskKindCannotBeBatched { kind } => {
|
||||||
|
write!(f, "a batch of tasks of type `{kind}` cannot be batched with any other type of task")
|
||||||
|
}
|
||||||
BatchStopReason::TaskCannotBeBatched { kind, id } => {
|
BatchStopReason::TaskCannotBeBatched { kind, id } => {
|
||||||
write!(f, "task with id {id} of type `{kind}` cannot be batched")
|
write!(f, "task with id {id} of type `{kind}` cannot be batched")
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue