This commit is contained in:
Clément Renault 2022-10-20 17:44:15 +02:00
parent 8b0427f0c4
commit 52e858a588
No known key found for this signature in database
GPG Key ID: 92ADA4E935E71FA4

View File

@ -414,7 +414,7 @@ async fn get_tasks(
// We first transform a potential indexUid=* into a "not specified indexUid filter" // We first transform a potential indexUid=* into a "not specified indexUid filter"
// for every one of the filters: type, status, and indexUid. // for every one of the filters: type, status, and indexUid.
let type_: Option<Vec<_>> = kind.and_then(fold_star_or); let kind: Option<Vec<_>> = kind.and_then(fold_star_or);
let uid: Option<Vec<_>> = uid.map(|x| x.into_iter().collect()); let uid: Option<Vec<_>> = uid.map(|x| x.into_iter().collect());
let status: Option<Vec<_>> = status.and_then(fold_star_or); let status: Option<Vec<_>> = status.and_then(fold_star_or);
let index_uid: Option<Vec<_>> = index_uid.and_then(fold_star_or); let index_uid: Option<Vec<_>> = index_uid.and_then(fold_star_or);
@ -423,7 +423,7 @@ async fn get_tasks(
"Tasks Seen".to_string(), "Tasks Seen".to_string(),
json!({ json!({
"filtered_by_index_uid": index_uid.as_ref().map_or(false, |v| !v.is_empty()), "filtered_by_index_uid": index_uid.as_ref().map_or(false, |v| !v.is_empty()),
"filtered_by_type": type_.as_ref().map_or(false, |v| !v.is_empty()), "filtered_by_type": kind.as_ref().map_or(false, |v| !v.is_empty()),
"filtered_by_status": status.as_ref().map_or(false, |v| !v.is_empty()), "filtered_by_status": status.as_ref().map_or(false, |v| !v.is_empty()),
}), }),
Some(&req), Some(&req),
@ -436,7 +436,7 @@ async fn get_tasks(
limit: Some(limit), limit: Some(limit),
from, from,
status, status,
kind: type_, kind,
index_uid, index_uid,
uid, uid,
before_enqueued_at, before_enqueued_at,