mirror of
				https://github.com/meilisearch/meilisearch.git
				synced 2025-11-04 09:56:28 +00:00 
			
		
		
		
	Add BatchReason::TaskKindCannotBeBatched
				
					
				
			This commit is contained in:
		@@ -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")
 | 
				
			||||||
            }
 | 
					            }
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user