feat: reduced memory usage

This commit is contained in:
Per Stark
2025-01-16 08:29:49 +01:00
parent c0d5fde2a4
commit 0826a23a60
5 changed files with 119 additions and 96 deletions
+4 -2
View File
@@ -38,9 +38,11 @@ async fn main() -> Result<(), Box<dyn std::error::Error>> {
.await?,
);
let job_queue = JobQueue::new(surreal_db_client.clone());
let openai_client = Arc::new(async_openai::Client::new());
let content_processor = ContentProcessor::new(surreal_db_client).await?;
let job_queue = JobQueue::new(surreal_db_client.clone(), openai_client.clone());
let content_processor = ContentProcessor::new(surreal_db_client, openai_client).await?;
loop {
// First, check for any unfinished jobs