fix: 轮询按运营商账户限流
All checks were successful
构建并部署前端到测试环境 / deploy (push) Successful in 55s

This commit is contained in:
luo
2026-10-26 14:31:15 +08:00
parent 049f8257fb
commit 06684e1fc0
88 changed files with 7919 additions and 486 deletions

View File

@@ -0,0 +1,61 @@
<template>
<ArtTableFullScreen
><div id="table-full-screen"
><ElCard shadow="never" class="art-table-card"
><p v-if="data"
>调度模式:{{ data.scheduler_mode }};新结构初始化状态:{{
data.init_state || '未初始化'
}}。</p
><ElAlert
title="待确认停复机指令数按队列前 500 条统计;QPS 为上一分钟实际调用。刷新不会修改调度。"
type="info"
:closable="false" /><ElAlert
v-if="error"
:title="error"
type="error"
:closable="false" /><SchedulerTable
:data="data?.items || []"
:definitions="fields"
:loading="loading"
row-key="carrier_id"
@refresh="load" /></ElCard></div
></ArtTableFullScreen>
</template>
<script setup lang="ts">
import { onMounted } from 'vue'
import { PollingSchedulerService as Service } from '@/api/modules/pollingScheduler'
import { useAuth } from '@/composables/useAuth'
import { useSchedulerRequest } from '@/composables/useSchedulerRequest'
import { SCHEDULER_PERMISSIONS } from '@/config/constants/pollingScheduler'
import { gatewayData } from '@/utils/business/gateway'
import SchedulerTable from '@/components/business/polling/SchedulerTable.vue'
defineOptions({ name: 'PollingCarrierQueues' })
const { hasAuth } = useAuth(),
{ data, loading, error, load } = useSchedulerRequest(
async () => gatewayData(await Service.getQueues()),
() => hasAuth(SCHEDULER_PERMISSIONS.queues.page)
)
const fields = [
['carrier_name', '运营商账户'],
['queue_length', '普通队列'],
['priority_length', '优先队列'],
['due_count', '已到期卡数'],
['running', '执行中卡任务'],
['inflight_limit', '执行上限'],
['qps_last_minute', '上一分钟 QPS'],
['rate_limit_waits', '限流等待'],
['rate_limited', '限流拒绝/超时'],
['expired_claims_1h', '1小时标记到期'],
['open_alerts', '未处理卡告警'],
['open_alerts_by_category', '按类别告警'],
['stop_resume_queue_length', '停复机队列'],
['stop_resume_due', '到期指令'],
['stop_resume_running', '执行中指令'],
['stop_resume_pending', '待确认(前500条)'],
['stop_resume_success_1h', '1小时成功'],
['stop_resume_failed_1h', '1小时失败'],
['stop_resume_retry_1h', '1小时推后重试'],
['stop_resume_unknown_1h', '1小时未知']
].map(([prop, label]) => ({ prop, label }))
onMounted(load)
</script>