mirror of
https://github.com/danswer-ai/danswer.git
synced 2025-06-22 14:00:57 +02:00
Fix Pull vs Poll naming (#77)
This commit is contained in:
parent
0c4dcb13c3
commit
8e9e284849
@ -251,13 +251,17 @@ def _process_batch_event(
|
|||||||
|
|
||||||
class SlackConnector(LoadConnector, PollConnector):
|
class SlackConnector(LoadConnector, PollConnector):
|
||||||
def __init__(
|
def __init__(
|
||||||
self, export_path_str: str, batch_size: int = INDEX_BATCH_SIZE
|
self, export_path_str: str | None = None, batch_size: int = INDEX_BATCH_SIZE
|
||||||
) -> None:
|
) -> None:
|
||||||
self.export_path_str = export_path_str
|
self.export_path_str = export_path_str
|
||||||
self.batch_size = batch_size
|
self.batch_size = batch_size
|
||||||
self.client = get_client()
|
self.client = get_client()
|
||||||
|
|
||||||
def load_from_state(self) -> Generator[list[Document], None, None]:
|
def load_from_state(self) -> Generator[list[Document], None, None]:
|
||||||
|
if self.export_path_str is None:
|
||||||
|
raise ValueError(
|
||||||
|
"This Slack connector was not set up with a state-export file."
|
||||||
|
)
|
||||||
export_path = Path(self.export_path_str)
|
export_path = Path(self.export_path_str)
|
||||||
|
|
||||||
with open(export_path / "channels.json") as f:
|
with open(export_path / "channels.json") as f:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user