FIX: Ensure that we shutdown thread pool (#1207)

This commit is contained in:
Alan Guo Xiang Tan 2025-03-21 11:08:36 +08:00 committed by GitHub
parent 451f7662b2
commit 01eced74a3
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 2 additions and 2 deletions

View File

@ -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

View File

@ -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