Skip to content

Commit 14adbcb

Browse files
committed
update slack redirect + token missing check
1 parent 9209fc8 commit 14adbcb

File tree

3 files changed

+5
-3
lines changed

3 files changed

+5
-3
lines changed

backend/danswer/danswerbot/slack/config.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,6 @@ def validate_channel_name(
6666
TENANT_HEARTBEAT_EXPIRATION = (
6767
30 # How long before a tenant's heartbeat expires, allowing other pods to take over
6868
)
69-
TENANT_ACQUISITION_INTERVAL = 60 # How often pods attempt to acquire unprocessed tenants and checks for new tokens
69+
TENANT_ACQUISITION_INTERVAL = 15 # How often pods attempt to acquire unprocessed tenants and checks for new tokens
7070

7171
MAX_TENANTS_PER_POD = int(os.getenv("MAX_TENANTS_PER_POD", 50))

backend/danswer/danswerbot/slack/listener.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -197,7 +197,9 @@ def _manage_clients_per_tenant(
197197
return
198198

199199
tokens_exist = tenant_bot_pair in self.slack_bot_tokens
200-
tokens_changed = slack_bot_tokens != self.slack_bot_tokens[tenant_bot_pair]
200+
tokens_changed = (
201+
tokens_exist and slack_bot_tokens != self.slack_bot_tokens[tenant_bot_pair]
202+
)
201203
if not tokens_exist or tokens_changed:
202204
if tokens_exist:
203205
logger.info(

web/src/app/admin/bots/SlackTokensForm.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ export const SlackTokensForm = ({
5151
: "Successfully created Slack Bot!",
5252
type: "success",
5353
});
54-
router.push(`/admin/bots/${botId}}`);
54+
router.push(`/admin/bots/${encodeURIComponent(botId)}`);
5555
} else {
5656
const responseJson = await response.json();
5757
const errorMsg = responseJson.detail || responseJson.message;

0 commit comments

Comments
 (0)