Skip to content

Commit

Permalink
Increased slim doc batch size for confluence connector (onyx-dot-app#…
Browse files Browse the repository at this point in the history
  • Loading branch information
hagen-danswer authored and ahmadassaf committed Nov 25, 2024
1 parent ed90ddb commit 1fe702c
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions backend/danswer/connectors/confluence/connector.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,8 @@
"restrictions.read.restrictions.group",
]

_SLIM_DOC_BATCH_SIZE = 1000


class ConfluenceConnector(LoadConnector, PollConnector, SlimConnector):
def __init__(
Expand Down Expand Up @@ -263,6 +265,7 @@ def retrieve_all_slim_documents(
for page in self.confluence_client.cql_paginate_all_expansions(
cql=page_query,
expand=restrictions_expand,
limit=_SLIM_DOC_BATCH_SIZE,
):
# If the page has restrictions, add them to the perm_sync_data
# These will be used by doc_sync.py to sync permissions
Expand All @@ -286,6 +289,7 @@ def retrieve_all_slim_documents(
for attachment in self.confluence_client.cql_paginate_all_expansions(
cql=attachment_cql,
expand=restrictions_expand,
limit=_SLIM_DOC_BATCH_SIZE,
):
doc_metadata_list.append(
SlimDocument(
Expand Down

0 comments on commit 1fe702c

Please sign in to comment.