mirror of
https://github.com/MODSetter/SurfSense.git
synced 2025-09-16 17:19:46 +00:00
update connector indexing / update connector service
This commit is contained in:
parent
ca98693005
commit
cd05a06a91
8 changed files with 1544 additions and 732 deletions
|
@ -101,6 +101,19 @@ class SearchSourceConnectorBase(BaseModel):
|
|||
# Ensure the bot token is not empty
|
||||
if not config.get("DISCORD_BOT_TOKEN"):
|
||||
raise ValueError("DISCORD_BOT_TOKEN cannot be empty")
|
||||
elif connector_type == SearchSourceConnectorType.JIRA_CONNECTOR:
|
||||
# For JIRA_CONNECTOR, allow JIRA_PERSONAL_ACCESS_TOKEN and JIRA_BASE_URL
|
||||
allowed_keys = ["JIRA_PERSONAL_ACCESS_TOKEN", "JIRA_BASE_URL"]
|
||||
if set(config.keys()) != set(allowed_keys):
|
||||
raise ValueError(f"For JIRA_CONNECTOR connector type, config must only contain these keys: {allowed_keys}")
|
||||
|
||||
# Ensure the token is not empty
|
||||
if not config.get("JIRA_PERSONAL_ACCESS_TOKEN"):
|
||||
raise ValueError("JIRA_PERSONAL_ACCESS_TOKEN cannot be empty")
|
||||
|
||||
# Ensure the base URL is not empty
|
||||
if not config.get("JIRA_BASE_URL"):
|
||||
raise ValueError("JIRA_BASE_URL cannot be empty")
|
||||
|
||||
return config
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue