mirror of
https://github.com/AstrBotDevs/AstrBot
synced 2026-07-16 01:40:15 +08:00
fix: reduce MCP server status polling frequency (#7399)
This commit is contained in:
@@ -284,8 +284,9 @@ export default {
|
||||
mounted() {
|
||||
this.getServers();
|
||||
this.refreshInterval = setInterval(() => {
|
||||
// 轮询时间延长到30秒,减少服务器压力,同时保持数据相对新鲜
|
||||
this.getServers();
|
||||
}, 5000);
|
||||
}, 30000);
|
||||
},
|
||||
unmounted() {
|
||||
if (this.refreshInterval) {
|
||||
|
||||
@@ -162,7 +162,7 @@ const {
|
||||
<InstalledPluginsTab :state="pageState" />
|
||||
|
||||
<!-- 指令面板标签页内容 -->
|
||||
<v-tab-item v-show="activeTab === 'components'">
|
||||
<v-tab-item v-if="activeTab === 'components'">
|
||||
<div class="mb-4 pt-4 pb-4">
|
||||
<div class="d-flex align-center flex-wrap" style="gap: 12px">
|
||||
<h2 class="text-h2 mb-0">{{ tm("tabs.handlersOperation") }}</h2>
|
||||
@@ -180,7 +180,7 @@ const {
|
||||
</v-tab-item>
|
||||
|
||||
<!-- 已安装的 MCP 服务器标签页内容 -->
|
||||
<v-tab-item v-show="activeTab === 'mcp'">
|
||||
<v-tab-item v-if="activeTab === 'mcp'">
|
||||
<div class="mb-4 pt-4 pb-4">
|
||||
<div class="d-flex align-center flex-wrap" style="gap: 12px">
|
||||
<h2 class="text-h2 mb-0">{{ tm("tabs.installedMcpServers") }}</h2>
|
||||
@@ -198,7 +198,7 @@ const {
|
||||
</v-tab-item>
|
||||
|
||||
<!-- Skills 标签页内容 -->
|
||||
<v-tab-item v-show="activeTab === 'skills'">
|
||||
<v-tab-item v-if="activeTab === 'skills'">
|
||||
<div class="mb-4 pt-4 pb-4">
|
||||
<div class="d-flex align-center flex-wrap" style="gap: 12px">
|
||||
<h2 class="text-h2 mb-0">{{ tm("tabs.skills") }}</h2>
|
||||
|
||||
Reference in New Issue
Block a user