fix: restore carrier reporting status summaries
This commit is contained in:
@@ -11,8 +11,10 @@ export function summarizeReportStatuses(statuses: string[]): ReportStatusSummary
|
||||
|
||||
const approved = statuses.filter((status) => status === 'approved').length;
|
||||
const failed = statuses.filter((status) => FAILED_REPORT_STATUSES.has(status)).length;
|
||||
const abandoned = statuses.filter((status) => status === 'abandoned').length;
|
||||
|
||||
if (approved === statuses.length) return { status: 'approved', approved, total: statuses.length };
|
||||
if (abandoned === statuses.length) return { status: 'abandoned', approved, total: statuses.length };
|
||||
|
||||
// Overall failure means every current target failed. A single failed channel must not
|
||||
// erase successful channels or targets that can still finish reporting.
|
||||
|
||||
Reference in New Issue
Block a user