Skip to content

Commit

Permalink
no retries!
Browse files Browse the repository at this point in the history
  • Loading branch information
hagen-danswer committed Nov 20, 2024
1 parent 59fbc04 commit 9030f6a
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion backend/danswer/connectors/confluence/connector.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
from typing import Any
from urllib.parse import quote

from atlassian import Confluence # type: ignore

from danswer.configs.app_configs import CONFLUENCE_CONNECTOR_LABELS_TO_SKIP
from danswer.configs.app_configs import CONTINUE_ON_CONNECTOR_FAILURE
from danswer.configs.app_configs import INDEX_BATCH_SIZE
Expand Down Expand Up @@ -117,7 +119,14 @@ def load_credentials(self, credentials: dict[str, Any]) -> dict[str, Any] | None
wiki_base=self.wiki_base,
)

spaces = self.confluence_client.get_all_spaces(limit=1)
client_without_retries = Confluence(
api_version="cloud" if self.is_cloud else "latest",
url=self.wiki_base.rstrip("/"),
username=credentials["confluence_username"] if self.is_cloud else None,
password=credentials["confluence_access_token"] if self.is_cloud else None,
token=credentials["confluence_access_token"] if not self.is_cloud else None,
)
spaces = client_without_retries.get_all_spaces(limit=1)
if not spaces:
raise RuntimeError(
f"No spaces found at {self.wiki_base}! "
Expand Down

0 comments on commit 9030f6a

Please sign in to comment.