FIX: Ensure that we shutdown thread pool (#1207)
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user