mirror of
https://github.com/meilisearch/meilisearch.git
synced 2025-09-05 20:26:31 +00:00
Optimize code
This commit is contained in:
@ -727,9 +727,7 @@ impl IndexScheduler {
|
||||
// If the registered task is a task cancelation
|
||||
// we inform the processing tasks to stop (if necessary).
|
||||
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_to_cancel)
|
||||
{
|
||||
if self.processing_tasks.read().unwrap().must_cancel_processing_tasks(&tasks) {
|
||||
self.scheduler.must_stop_processing.must_stop();
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user