mirror of
https://github.com/danswer-ai/danswer.git
synced 2025-03-26 17:51:54 +01:00
Notion connector test separately (#372)
This commit is contained in:
parent
43efa9da94
commit
6bae93ad3c
@ -1,4 +1,3 @@
|
||||
"""Notion reader."""
|
||||
import time
|
||||
from dataclasses import dataclass
|
||||
from dataclasses import fields
|
||||
@ -231,3 +230,14 @@ class NotionConnector(LoadConnector, PollConnector):
|
||||
query_dict["start_cursor"] = db_res.next_cursor
|
||||
else:
|
||||
break
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
import os
|
||||
|
||||
connector = NotionConnector()
|
||||
connector.load_credentials(
|
||||
{"notion_integration_token": os.environ.get("NOTION_INTEGRATION_TOKEN")}
|
||||
)
|
||||
document_batches = connector.load_from_state()
|
||||
print(next(document_batches))
|
||||
|
Loading…
x
Reference in New Issue
Block a user