(chunkId: string, success: boolean)
| 829 | } |
| 830 | |
| 831 | private handleChunkCompletion(chunkId: string, success: boolean): void { |
| 832 | const chunk = this.workChunks.get(chunkId); |
| 833 | if (chunk) { |
| 834 | chunk.status = success ? "completed" : "failed"; |
| 835 | chunk.progress = success ? 100 : 0; |
| 836 | |
| 837 | if (success) { |
| 838 | const completedSet = this.completedChunks.get(chunk.jobId); |
| 839 | if (completedSet) { |
| 840 | completedSet.add(chunkId); |
| 841 | } |
| 842 | } |
| 843 | |
| 844 | this.checkJobCompletion(chunk.jobId); |
| 845 | } |
| 846 | } |
| 847 | |
| 848 | addJob(job: QueueJob): string { |
| 849 | this.queue.push(job); |
no test coverage detected