Kept the runtime API responsive during blocking work (#1043)

This commit is contained in:
Thorsten Sommer authored and GitHub committed 2026-10-10 21:39:13 +02:00
1 parent 4616d1a4b2
commit fb756dd767
11 files changed
+389 -77

No files matched your search

+1 -1
View File
@@ -524,7 +524,7 @@ pub async fn extract_data(
// whole file, and a failure here means we cannot answer the request at all.
//
let tokenizer = if query.include_token_count {
match crate::tokenizer::get_tokenizer(&query.tokenizer_path) {
match crate::tokenizer::get_tokenizer_off_worker(query.tokenizer_path.clone()).await {
Ok(tokenizer) => Some(tokenizer),
Err(e) => {
let error = ExtractionError::new(ExtractionErrorCode::InvalidRequest, format!("The tokenizer could not be loaded: {e}"));