mirror of
https://github.com/meilisearch/meilisearch.git
synced 2025-09-05 20:26:31 +00:00
Optimization
This commit is contained in:
@ -383,7 +383,11 @@ impl Queue {
|
|||||||
// tasks that are not processing. The non-processing ones are filtered normally while the processing ones
|
// tasks that are not processing. The non-processing ones are filtered normally while the processing ones
|
||||||
// are entirely removed unless the in-memory startedAt variable falls within the date filter.
|
// are entirely removed unless the in-memory startedAt variable falls within the date filter.
|
||||||
// Once we have filtered the two subsets, we put them back together and assign it back to `tasks`.
|
// Once we have filtered the two subsets, we put them back together and assign it back to `tasks`.
|
||||||
tasks = {
|
tasks = 'started_at: {
|
||||||
|
if after_started_at.is_none() && before_started_at.is_none() {
|
||||||
|
break 'started_at tasks;
|
||||||
|
}
|
||||||
|
|
||||||
let (mut filtered_non_processing_tasks, mut filtered_processing_tasks) =
|
let (mut filtered_non_processing_tasks, mut filtered_processing_tasks) =
|
||||||
(&tasks - &**processing_tasks, &tasks & &**processing_tasks);
|
(&tasks - &**processing_tasks, &tasks & &**processing_tasks);
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user