mirror of
https://github.com/perstarkse/minne.git
synced 2026-04-24 09:48:32 +02:00
chore: pedantic clippy stuff
This commit is contained in:
@@ -7,7 +7,7 @@ use tracing_subscriber::{fmt, prelude::*, EnvFilter};
|
|||||||
use zettle_db::{
|
use zettle_db::{
|
||||||
ingress::{
|
ingress::{
|
||||||
content_processor::ContentProcessor,
|
content_processor::ContentProcessor,
|
||||||
jobqueue::{self, JobQueue, MAX_ATTEMPTS},
|
jobqueue::{JobQueue, MAX_ATTEMPTS},
|
||||||
},
|
},
|
||||||
storage::{
|
storage::{
|
||||||
db::{get_item, SurrealDbClient},
|
db::{get_item, SurrealDbClient},
|
||||||
|
|||||||
@@ -186,7 +186,7 @@ impl IngressObject {
|
|||||||
|
|
||||||
let content = if token_count > MAX_TOKENS {
|
let content = if token_count > MAX_TOKENS {
|
||||||
// Split content into structural blocks
|
// Split content into structural blocks
|
||||||
let blocks: Vec<&str> = content.split(|c| c == '\n').collect();
|
let blocks: Vec<&str> = content.split('\n').collect();
|
||||||
let mut truncated = String::new();
|
let mut truncated = String::new();
|
||||||
let mut current_tokens = 0;
|
let mut current_tokens = 0;
|
||||||
|
|
||||||
|
|||||||
@@ -2,10 +2,7 @@ use crate::{
|
|||||||
error::{AppError, HtmlError},
|
error::{AppError, HtmlError},
|
||||||
page_data,
|
page_data,
|
||||||
server::AppState,
|
server::AppState,
|
||||||
storage::types::{
|
storage::types::{job::Job, user::User},
|
||||||
job::{Job, JobStatus},
|
|
||||||
user::User,
|
|
||||||
},
|
|
||||||
};
|
};
|
||||||
use axum::{
|
use axum::{
|
||||||
extract::{Path, State},
|
extract::{Path, State},
|
||||||
@@ -14,7 +11,6 @@ use axum::{
|
|||||||
use axum_session_auth::AuthSession;
|
use axum_session_auth::AuthSession;
|
||||||
use axum_session_surreal::SessionSurrealPool;
|
use axum_session_surreal::SessionSurrealPool;
|
||||||
use surrealdb::{engine::any::Any, Surreal};
|
use surrealdb::{engine::any::Any, Surreal};
|
||||||
use tracing::info;
|
|
||||||
|
|
||||||
use super::render_template;
|
use super::render_template;
|
||||||
|
|
||||||
@@ -35,13 +31,6 @@ pub async fn show_queue_tasks(
|
|||||||
.await
|
.await
|
||||||
.map_err(|e| HtmlError::new(e, state.templates.clone()))?;
|
.map_err(|e| HtmlError::new(e, state.templates.clone()))?;
|
||||||
|
|
||||||
for job in &jobs {
|
|
||||||
match job.status {
|
|
||||||
JobStatus::Created => info!("Found a created job"),
|
|
||||||
_ => continue,
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
let rendered = render_template(
|
let rendered = render_template(
|
||||||
ShowQueueTasks::template_name(),
|
ShowQueueTasks::template_name(),
|
||||||
ShowQueueTasks { jobs, user },
|
ShowQueueTasks { jobs, user },
|
||||||
|
|||||||
Reference in New Issue
Block a user