mirror of
https://github.com/MODSetter/SurfSense.git
synced 2026-06-02 19:55:18 +02:00
feat(gateway): include Discord in gateway maintenance
This commit is contained in:
parent
7860714f74
commit
e85710dd7b
1 changed files with 7 additions and 0 deletions
|
|
@ -92,6 +92,13 @@ def gateway_health_check_task() -> None:
|
||||||
cursor_state[key] = metadata[key]
|
cursor_state[key] = metadata[key]
|
||||||
account.cursor_state = cursor_state
|
account.cursor_state = cursor_state
|
||||||
account.bot_username = metadata.get("bot_username")
|
account.bot_username = metadata.get("bot_username")
|
||||||
|
elif account.platform == ExternalChatPlatform.DISCORD:
|
||||||
|
cursor_state = dict(account.cursor_state or {})
|
||||||
|
for key in ("bot_user_id", "bot_username", "global_name"):
|
||||||
|
if key in metadata:
|
||||||
|
cursor_state[key] = metadata[key]
|
||||||
|
account.cursor_state = cursor_state
|
||||||
|
account.bot_username = metadata.get("bot_username")
|
||||||
except Exception:
|
except Exception:
|
||||||
logger.warning(
|
logger.warning(
|
||||||
"External chat health check failed platform=%s account_id=%s",
|
"External chat health check failed platform=%s account_id=%s",
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue