mirror of
https://github.com/meilisearch/meilisearch.git
synced 2025-09-06 04:36:32 +00:00
Optimize code
This commit is contained in:
@ -727,9 +727,7 @@ impl IndexScheduler {
|
|||||||
// If the registered task is a task cancelation
|
// If the registered task is a task cancelation
|
||||||
// we inform the processing tasks to stop (if necessary).
|
// we inform the processing tasks to stop (if necessary).
|
||||||
if let KindWithContent::TaskCancelation { tasks, .. } = kind {
|
if let KindWithContent::TaskCancelation { tasks, .. } = kind {
|
||||||
let tasks_to_cancel = RoaringBitmap::from_iter(tasks);
|
if self.processing_tasks.read().unwrap().must_cancel_processing_tasks(&tasks) {
|
||||||
if self.processing_tasks.read().unwrap().must_cancel_processing_tasks(&tasks_to_cancel)
|
|
||||||
{
|
|
||||||
self.scheduler.must_stop_processing.must_stop();
|
self.scheduler.must_stop_processing.must_stop();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user