Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 10 additions & 4 deletions weaviate/collections/batch/base.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import contextvars
import functools
import math
import os
import threading
Expand Down Expand Up @@ -325,11 +327,15 @@ def __batch_send(self) -> None:
uuid_lookup=self.__uuid_lookup,
)
# do not block the thread - the results are written to a central (locked) list and we want to have multiple concurrent batch-requests
ctx = contextvars.copy_context()
self.__executor.submit(
self.__send_batch,
objs,
refs,
readd_rate_limit=isinstance(self.__batching_mode, _RateLimitedBatching),
ctx.run,
functools.partial(
self.__send_batch,
objs,
refs,
readd_rate_limit=isinstance(self.__batching_mode, _RateLimitedBatching),
),
)

time.sleep(refresh_time)
Expand Down