From 01eced74a3e837d83fb74e055d38801c5ad65421 Mon Sep 17 00:00:00 2001 From: Alan Guo Xiang Tan Date: Fri, 21 Mar 2025 11:08:36 +0800 Subject: [PATCH] FIX: Ensure that we shutdown thread pool (#1207) --- lib/embeddings/vector.rb | 2 +- lib/sentiment/post_classification.rb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/embeddings/vector.rb b/lib/embeddings/vector.rb index 582de7fb..c4edd78a 100644 --- a/lib/embeddings/vector.rb +++ b/lib/embeddings/vector.rb @@ -49,7 +49,7 @@ module DiscourseAi .zip(*promised_embeddings) .value! .each { |e| schema.store(e[:target], e[:embedding], e[:digest]) } - + ensure pool.shutdown pool.wait_for_termination end diff --git a/lib/sentiment/post_classification.rb b/lib/sentiment/post_classification.rb index 3e0bab88..ce7302a4 100644 --- a/lib/sentiment/post_classification.rb +++ b/lib/sentiment/post_classification.rb @@ -92,7 +92,7 @@ module DiscourseAi .zip(*promised_classifications) .value! .each { |r| store_classification(r[:target], r[:classification]) } - + ensure pool.shutdown pool.wait_for_termination end