Skip to content

Commit 607fc7b

Browse files
committed
try spawn blocking
1 parent 27a39d5 commit 607fc7b

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/logs_store.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,9 @@ impl LogsStore {
144144
);
145145

146146
tracing::info!("LogsStore extract_query_logs");
147-
let logs_hash_map = extract_query_logs(&content);
147+
let logs_hash_map = tokio::task::spawn_blocking(move || extract_query_logs(&content))
148+
.await
149+
.unwrap();
148150
tracing::info!(
149151
"LogsStore extract_query_logs. DONE, logs_hash_map.len()={}",
150152
logs_hash_map.len()

0 commit comments

Comments
 (0)