fix: avoid multiple paginated queries in metrics
This commit is contained in:
parent
744dcd1895
commit
4c25f3f83e
1 changed files with 2 additions and 1 deletions
|
|
@ -9,6 +9,7 @@ import {
|
||||||
fetchOpenScopedTickets,
|
fetchOpenScopedTickets,
|
||||||
fetchScopedTicketsByCreatedRange,
|
fetchScopedTicketsByCreatedRange,
|
||||||
fetchScopedTicketsByResolvedRange,
|
fetchScopedTicketsByResolvedRange,
|
||||||
|
fetchScopedTicketsByResolvedRangeSnapshot,
|
||||||
normalizeStatus,
|
normalizeStatus,
|
||||||
} from "./reports"
|
} from "./reports"
|
||||||
import { requireStaff } from "./rbac"
|
import { requireStaff } from "./rbac"
|
||||||
|
|
@ -294,7 +295,7 @@ const metricResolvers: Record<string, MetricResolver> = {
|
||||||
queueIds,
|
queueIds,
|
||||||
)
|
)
|
||||||
const resolvedTickets = filterTicketsByQueue(
|
const resolvedTickets = filterTicketsByQueue(
|
||||||
await fetchScopedTicketsByResolvedRange(ctx, tenantId, viewer, startMs, endMs, companyId),
|
await fetchScopedTicketsByResolvedRangeSnapshot(ctx, tenantId, viewer, startMs, endMs, companyId),
|
||||||
queueIds,
|
queueIds,
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue