fix: 爬虫页队列数被查询 LIMIT 截断(显示 199,实际 1620)
队列数字原本取 len(查询结果),而 ListActive 带 LIMIT 200: 1 个执行中 + 199 个排队刚好凑满,页面就永远显示 199, 看起来像「队列被卡住了、只有这么点任务」。 - 数字改用 SELECT count(*) GROUP BY status,不受 LIMIT 影响 - 表格仍只列前 50 个(渲染上千行会拖慢页面), 并在标题下注明「共 N 个,下面只列前 50 个」 - 渲染测试新增一条:截断时必须出现提示文案
This commit is contained in:
@ -37,6 +37,7 @@
|
||||
</table>
|
||||
|
||||
<h2>待抓队列({{.QueuedCount}})</h2>
|
||||
{{if gt .QueuedCount .QueuedShown}}<p class="muted">队列里共 {{.QueuedCount}} 个,下面只列前 {{.QueuedShown}} 个。</p>{{end}}
|
||||
<table>
|
||||
<thead><tr><th>品牌</th><th>入队时间</th><th>已等待</th></tr></thead>
|
||||
<tbody>
|
||||
|
||||
Reference in New Issue
Block a user