MCPcopy Create free account
hub / github.com/0PandaDEV/Ziit / handleChunkCompletion

Method handleChunkCompletion

server/utils/import-queue.ts:831–846  ·  view source on GitHub ↗
(chunkId: string, success: boolean)

Source from the content-addressed store, hash-verified

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);

Callers 1

handleWorkCompletionMethod · 0.95

Calls 1

checkJobCompletionMethod · 0.95

Tested by

no test coverage detected