Skip to content

Commit

Permalink
Delete unused DeclarativePartitionFactory
Browse files Browse the repository at this point in the history
  • Loading branch information
tolik0 committed Dec 4, 2024
1 parent a3304b9 commit 4ddbb84
Showing 1 changed file with 0 additions and 27 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -38,33 +38,6 @@ def create(self, stream_slice: StreamSlice) -> Partition:
stream_slice,
)

class DeclarativePartitionFactory1:
def __init__(
self,
stream_name: str,
json_schema: Mapping[str, Any],
retriever: Retriever,
message_repository: MessageRepository,
) -> None:
"""
The DeclarativePartitionFactory takes a retriever_factory and not a retriever directly. The reason is that our components are not
thread safe and classes like `DefaultPaginator` may not work because multiple threads can access and modify a shared field across each other.
In order to avoid these problems, we will create one retriever per thread which should make the processing thread-safe.
"""
self._stream_name = stream_name
self._json_schema = json_schema
self._retriever = retriever
self._message_repository = message_repository

def create(self, stream_slice: StreamSlice) -> Partition:
return DeclarativePartition(
self._stream_name,
self._json_schema,
self._retriever,
self._message_repository,
stream_slice,
)

class DeclarativePartition(Partition):
def __init__(
self,
Expand Down

0 comments on commit 4ddbb84

Please sign in to comment.