mirror of
https://github.com/meilisearch/MeiliSearch
synced 2025-04-18 07:57:59 +02:00
Add BatchReason::TaskKindCannotBeBatched
This commit is contained in:
parent
b73660fa8e
commit
f8ff91ed30
@ -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…
x
Reference in New Issue
Block a user