()
| 36 | ) |
| 37 | } |
| 38 | proxyAddCacheErrorA() { |
| 39 | let len = this.cacheErrorA.length |
| 40 | if (!len) return |
| 41 | const arr = groupArray(this.cacheErrorA, ...GROUPARRAYKEY) |
| 42 | const arrA = arr.filter(item => item.length < MAXLENGTHA) |
| 43 | const arrB = arr.filter(item => item.length >= MAXLENGTHA) |
| 44 | |
| 45 | if (arrA.length) { |
| 46 | sendData.emit(arrA.flat(Infinity)) |
| 47 | } |
| 48 | if (arrB.length) { |
| 49 | const arrBsum: any[] = [] |
| 50 | arrB.forEach(item => { |
| 51 | const sumItem = item[0] |
| 52 | sumItem.batchError = true |
| 53 | sumItem.batchErrorLength = item.length |
| 54 | sumItem.batchErrorLastHappenTime = item[item.length - 1].triggerTime |
| 55 | arrBsum.push(sumItem) |
| 56 | }) |
| 57 | this.cacheErrorB.push(...arrBsum) |
| 58 | this.throttleProxyAddCacheErrorB() |
| 59 | } |
| 60 | |
| 61 | while (len--) { |
| 62 | this.cacheErrorA.shift() |
| 63 | } |
| 64 | } |
| 65 | proxyAddCacheErrorB() { |
| 66 | let len = this.cacheErrorB.length |
| 67 | if (!len) return |
no test coverage detected