mirror of
https://github.com/danswer-ai/danswer.git
synced 2025-05-12 21:00:07 +02:00
k
This commit is contained in:
parent
f371efc916
commit
ab8081c36b
@ -621,6 +621,8 @@ POD_NAMESPACE = os.environ.get("POD_NAMESPACE")
|
|||||||
|
|
||||||
DEV_MODE = os.environ.get("DEV_MODE", "").lower() == "true"
|
DEV_MODE = os.environ.get("DEV_MODE", "").lower() == "true"
|
||||||
|
|
||||||
|
MOCK_CONNECTOR_FILE_PATH = os.environ.get("MOCK_CONNECTOR_FILE_PATH")
|
||||||
|
|
||||||
TEST_ENV = os.environ.get("TEST_ENV", "").lower() == "true"
|
TEST_ENV = os.environ.get("TEST_ENV", "").lower() == "true"
|
||||||
|
|
||||||
# Set to true to mock LLM responses for testing purposes
|
# Set to true to mock LLM responses for testing purposes
|
||||||
|
@ -22,6 +22,7 @@ from onyx.auth.users import current_curator_or_admin_user
|
|||||||
from onyx.auth.users import current_user
|
from onyx.auth.users import current_user
|
||||||
from onyx.background.celery.versioned_apps.primary import app as primary_app
|
from onyx.background.celery.versioned_apps.primary import app as primary_app
|
||||||
from onyx.configs.app_configs import ENABLED_CONNECTOR_TYPES
|
from onyx.configs.app_configs import ENABLED_CONNECTOR_TYPES
|
||||||
|
from onyx.configs.app_configs import MOCK_CONNECTOR_FILE_PATH
|
||||||
from onyx.configs.constants import DocumentSource
|
from onyx.configs.constants import DocumentSource
|
||||||
from onyx.configs.constants import FileOrigin
|
from onyx.configs.constants import FileOrigin
|
||||||
from onyx.configs.constants import MilestoneRecordType
|
from onyx.configs.constants import MilestoneRecordType
|
||||||
@ -613,6 +614,16 @@ def get_connector_indexing_status(
|
|||||||
) -> list[ConnectorIndexingStatus]:
|
) -> list[ConnectorIndexingStatus]:
|
||||||
indexing_statuses: list[ConnectorIndexingStatus] = []
|
indexing_statuses: list[ConnectorIndexingStatus] = []
|
||||||
|
|
||||||
|
if MOCK_CONNECTOR_FILE_PATH:
|
||||||
|
import json
|
||||||
|
|
||||||
|
with open(MOCK_CONNECTOR_FILE_PATH, "r") as f:
|
||||||
|
raw_data = json.load(f)
|
||||||
|
connector_indexing_statuses = [
|
||||||
|
ConnectorIndexingStatus(**status) for status in raw_data
|
||||||
|
]
|
||||||
|
return connector_indexing_statuses
|
||||||
|
|
||||||
# NOTE: If the connector is deleting behind the scenes,
|
# NOTE: If the connector is deleting behind the scenes,
|
||||||
# accessing cc_pairs can be inconsistent and members like
|
# accessing cc_pairs can be inconsistent and members like
|
||||||
# connector or credential may be None.
|
# connector or credential may be None.
|
||||||
|
@ -97,6 +97,9 @@ services:
|
|||||||
- LINEAR_CLIENT_ID=${LINEAR_CLIENT_ID:-}
|
- LINEAR_CLIENT_ID=${LINEAR_CLIENT_ID:-}
|
||||||
- LINEAR_CLIENT_SECRET=${LINEAR_CLIENT_SECRET:-}
|
- LINEAR_CLIENT_SECRET=${LINEAR_CLIENT_SECRET:-}
|
||||||
|
|
||||||
|
# Demo purposes
|
||||||
|
- MOCK_CONNECTOR_FILE_PATH=${MOCK_CONNECTOR_FILE_PATH:-}
|
||||||
|
|
||||||
# Analytics Configs
|
# Analytics Configs
|
||||||
- SENTRY_DSN=${SENTRY_DSN:-}
|
- SENTRY_DSN=${SENTRY_DSN:-}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user