feat: reduced memory usage

This commit is contained in:
Per Stark
2025-01-16 08:29:49 +01:00
parent 2e70bd0636
commit e58ead5cd7
5 changed files with 119 additions and 96 deletions

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