FIX: Ensure that we shutdown thread pool (#1207)
This commit is contained in:
parent
451f7662b2
commit
01eced74a3
|
@ -49,7 +49,7 @@ module DiscourseAi
|
||||||
.zip(*promised_embeddings)
|
.zip(*promised_embeddings)
|
||||||
.value!
|
.value!
|
||||||
.each { |e| schema.store(e[:target], e[:embedding], e[:digest]) }
|
.each { |e| schema.store(e[:target], e[:embedding], e[:digest]) }
|
||||||
|
ensure
|
||||||
pool.shutdown
|
pool.shutdown
|
||||||
pool.wait_for_termination
|
pool.wait_for_termination
|
||||||
end
|
end
|
||||||
|
|
|
@ -92,7 +92,7 @@ module DiscourseAi
|
||||||
.zip(*promised_classifications)
|
.zip(*promised_classifications)
|
||||||
.value!
|
.value!
|
||||||
.each { |r| store_classification(r[:target], r[:classification]) }
|
.each { |r| store_classification(r[:target], r[:classification]) }
|
||||||
|
ensure
|
||||||
pool.shutdown
|
pool.shutdown
|
||||||
pool.wait_for_termination
|
pool.wait_for_termination
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue