A music player that connects to your cloud/distributed storage.
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

fix: sync #performedInitialProcess

+17 -6
+17 -6
src/components/orchestrator/process-tracks/element.js
··· 55 55 // Broadcast if needed 56 56 if (this.hasAttribute("group")) { 57 57 const actions = this.broadcast(this.nameWithGroup, { 58 - perfInit: { 58 + getPerfInit: { 59 + strategy: "leaderOnly", 60 + fn: this.#performedInitialProcess.get, 61 + }, 62 + setPerfInit: { 59 63 strategy: "replicate", 60 64 fn: this.#performedInitialProcess.set, 61 65 }, 62 66 process: { strategy: "leaderOnly", fn: this.process }, 63 67 }); 64 68 65 - if (actions) { 66 - this.process = actions.process; 67 - this.#isProcessing.set = actions.perfInit; 68 - } 69 + if (!actions) return; 70 + 71 + this.process = actions.process; 72 + this.#isProcessing.set = actions.setPerfInit; 73 + 74 + // Sync #performedInitialProcess with leader 75 + actions.getPerfInit().then((val) => { 76 + this.#performedInitialProcess.set(val); 77 + }); 69 78 } 70 79 71 80 // Super ··· 85 94 this.output = output; 86 95 this.metadataProcessor = metadataProcessor; 87 96 97 + // Worker link 98 + const link = this.workerLink(); 99 + 88 100 // Wait until defined 89 101 await customElements.whenDefined(input.localName); 90 102 await customElements.whenDefined(output.localName); 91 103 await customElements.whenDefined(metadataProcessor.localName); 92 104 93 105 // Sync progress with worker 94 - const link = this.workerLink(); 95 106 listen("progress", this.#progress.set, link); 96 107 this.#proxy.progress().then(this.#progress.set); 97 108