Add more tracing

Signed-off-by: trivernis <trivernis@protonmail.com>
pull/4/head
trivernis 3 years ago
parent 9e0c72bd66
commit c087f2d281

@ -53,6 +53,7 @@ pub enum NegatableComparator<T> {
IsNot(T),
}
#[tracing::instrument(level = "debug")]
pub fn build_find_filter_conditions(filters: Vec<Vec<FilterProperty>>) -> Condition {
filters
.into_iter()

@ -10,6 +10,7 @@ use mediarepo_model::file::{File, FileStatus};
use mediarepo_model::repo::Repo;
use std::collections::HashMap;
#[tracing::instrument(level = "debug", skip(repo))]
pub async fn find_files_for_filters(
repo: &Repo,
expressions: Vec<FilterExpression>,
@ -21,6 +22,7 @@ pub async fn find_files_for_filters(
repo.find_files_by_filters(filters).await
}
#[tracing::instrument(level = "debug")]
fn get_tag_names_from_expressions(expressions: &Vec<FilterExpression>) -> Vec<String> {
expressions
.iter()
@ -44,6 +46,7 @@ fn get_tag_names_from_expressions(expressions: &Vec<FilterExpression>) -> Vec<St
.collect::<Vec<String>>()
}
#[tracing::instrument(level = "debug")]
fn build_filters_from_expressions(
expressions: Vec<FilterExpression>,
tag_id_map: &HashMap<String, i64>,

@ -24,6 +24,7 @@ pub struct FileSortContext {
change_time: NaiveDateTime,
}
#[tracing::instrument(level = "debug", skip(repo, files))]
pub async fn sort_files_by_properties(
repo: &Repo,
sort_expression: Vec<SortKey>,

Loading…
Cancel
Save