FIX: Shutdown embeddings thread pool after processing (#961)
This commit is contained in:
parent
ef07fcb308
commit
251628bfa1
|
@ -81,6 +81,9 @@ module DiscourseAi
|
||||||
.zip(*promised_embeddings)
|
.zip(*promised_embeddings)
|
||||||
.value!
|
.value!
|
||||||
.each { |e| save_to_db(e[:target], e[:embedding], e[:digest]) }
|
.each { |e| save_to_db(e[:target], e[:embedding], e[:digest]) }
|
||||||
|
|
||||||
|
pool.shutdown
|
||||||
|
pool.wait_for_termination
|
||||||
end
|
end
|
||||||
|
|
||||||
def generate_representation_from(target, persist: true)
|
def generate_representation_from(target, persist: true)
|
||||||
|
|
Loading…
Reference in New Issue