From 8c1ef78afd137bc332150b125c03e05e7cb81d7a Mon Sep 17 00:00:00 2001 From: pablodanswer Date: Fri, 6 Sep 2024 14:27:57 -0700 Subject: [PATCH 1/2] add connector config --- backend/danswer/connectors/confluence/connector.py | 2 ++ backend/danswer/connectors/confluence/rate_limit_handler.py | 2 +- .../app/admin/connectors/[connector]/AddConnectorPage.tsx | 1 + web/src/components/IsPublicGroupSelector.tsx | 3 +++ web/src/lib/connectors/connectors.ts | 5 +++-- 5 files changed, 10 insertions(+), 3 deletions(-) diff --git a/backend/danswer/connectors/confluence/connector.py b/backend/danswer/connectors/confluence/connector.py index 78efce4ab98..94365445056 100644 --- a/backend/danswer/connectors/confluence/connector.py +++ b/backend/danswer/connectors/confluence/connector.py @@ -220,6 +220,8 @@ def recurse_children_pages( # Initial fetch of first level children index = start_ind + print("\n\n\nthis is my page id") + print(page_id) while batch := self._fetch_single_depth_child_pages( index, self.batch_size, page_id ): diff --git a/backend/danswer/connectors/confluence/rate_limit_handler.py b/backend/danswer/connectors/confluence/rate_limit_handler.py index 1af2a193f6c..822badb9b99 100644 --- a/backend/danswer/connectors/confluence/rate_limit_handler.py +++ b/backend/danswer/connectors/confluence/rate_limit_handler.py @@ -23,7 +23,7 @@ class ConfluenceRateLimitError(Exception): def make_confluence_call_handle_rate_limit(confluence_call: F) -> F: def wrapped_call(*args: list[Any], **kwargs: Any) -> Any: - max_retries = 10 + max_retries = 5 starting_delay = 5 backoff = 2 max_delay = 600 diff --git a/web/src/app/admin/connectors/[connector]/AddConnectorPage.tsx b/web/src/app/admin/connectors/[connector]/AddConnectorPage.tsx index f05c874d0ef..c068a6564b5 100644 --- a/web/src/app/admin/connectors/[connector]/AddConnectorPage.tsx +++ b/web/src/app/admin/connectors/[connector]/AddConnectorPage.tsx @@ -514,6 +514,7 @@ export default function AddConnector({ {isPaidEnterpriseFeaturesEnabled && ( <> diff --git a/web/src/components/IsPublicGroupSelector.tsx b/web/src/components/IsPublicGroupSelector.tsx index 5de73353f2e..c478d29b177 100644 --- a/web/src/components/IsPublicGroupSelector.tsx +++ b/web/src/components/IsPublicGroupSelector.tsx @@ -16,11 +16,13 @@ export const IsPublicGroupSelector = ({ formikProps, objectName, publicToWhom = "Users", + removeIndent = false, enforceGroupSelection = true, }: { formikProps: FormikProps; objectName: string; publicToWhom?: string; + removeIndent?: boolean; enforceGroupSelection?: boolean; }) => { const { data: userGroups, isLoading: userGroupsIsLoading } = useUserGroups(); @@ -74,6 +76,7 @@ export const IsPublicGroupSelector = ({ <> Date: Fri, 6 Sep 2024 14:37:45 -0700 Subject: [PATCH 2/2] update confluence connector --- backend/danswer/connectors/confluence/connector.py | 2 -- 1 file changed, 2 deletions(-) diff --git a/backend/danswer/connectors/confluence/connector.py b/backend/danswer/connectors/confluence/connector.py index 94365445056..78efce4ab98 100644 --- a/backend/danswer/connectors/confluence/connector.py +++ b/backend/danswer/connectors/confluence/connector.py @@ -220,8 +220,6 @@ def recurse_children_pages( # Initial fetch of first level children index = start_ind - print("\n\n\nthis is my page id") - print(page_id) while batch := self._fetch_single_depth_child_pages( index, self.batch_size, page_id ):