Formatting
This commit is contained in:
@@ -5,7 +5,7 @@ use std::time::Duration;
|
||||
use tokio::io::AsyncWriteExt;
|
||||
use tracing::{error, info, warn};
|
||||
|
||||
use super::{llm, prompt, AnalysisInput, AnalyzeReceiver, ANALYSIS_INPUT_FILE, DOCUMENT_FILE};
|
||||
use super::{ANALYSIS_INPUT_FILE, AnalysisInput, AnalyzeReceiver, DOCUMENT_FILE, llm, prompt};
|
||||
use crate::config::Config;
|
||||
use crate::gazetteer::Gazetteer;
|
||||
use crate::{BusyGuard, WorkerBusy};
|
||||
@@ -20,10 +20,7 @@ pub async fn run(
|
||||
worker_busy: WorkerBusy,
|
||||
vocab: Arc<Gazetteer>,
|
||||
) {
|
||||
info!(
|
||||
vocab_entries = vocab.len(),
|
||||
"Analyze worker started"
|
||||
);
|
||||
info!(vocab_entries = vocab.len(), "Analyze worker started");
|
||||
let timeout = Duration::from_secs(config.llm_timeout_seconds);
|
||||
|
||||
while let Some(job) = rx.recv().await {
|
||||
@@ -144,7 +141,10 @@ async fn process(
|
||||
/// state machine simply sees the job as still pending and retries.
|
||||
async fn write_atomic(path: &Path, bytes: &[u8]) -> std::io::Result<()> {
|
||||
let tmp = path.with_extension({
|
||||
let mut ext = path.extension().map(|s| s.to_os_string()).unwrap_or_default();
|
||||
let mut ext = path
|
||||
.extension()
|
||||
.map(|s| s.to_os_string())
|
||||
.unwrap_or_default();
|
||||
ext.push(".tmp");
|
||||
ext
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user