sliftutils 1.7.93 → 1.7.94
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -228,12 +228,13 @@ export class ArchivesChain implements IArchives {
|
|
|
228
228
|
}
|
|
229
229
|
console.log(`Storage routing config for ${this.getDebugName()} is out of date (stored version ${existing && getConfigVersion(existing) || "none"}, ours ${getConfigVersion(this.configured)}): writing ours to all ${writtenUrls.size} nodes (write time ${new Date(routingWriteTime).toISOString()}): ${[...writtenUrls].join(", ")}`);
|
|
230
230
|
writtenUrls.clear();
|
|
231
|
-
|
|
232
|
-
|
|
231
|
+
// We have to write to all the sources, of course. Otherwise, we get into weird situations where a broken source prevents us from writing to a source that would accept the write, and the source is broken because we didn't write to the other source.
|
|
232
|
+
await Promise.allSettled(sources.map(async source => {
|
|
233
|
+
if (writtenUrls.has(source.config.url)) return;
|
|
233
234
|
writtenUrls.add(source.config.url);
|
|
234
235
|
await source.write(archives => archives.set(ROUTING_FILE, routingData, { lastModified: routingWriteTime }));
|
|
235
236
|
console.log(`Wrote storage routing config version ${getConfigVersion(this.configured)} to ${source.config.url}`);
|
|
236
|
-
}
|
|
237
|
+
}));
|
|
237
238
|
} catch (e) {
|
|
238
239
|
for (let source of sources) {
|
|
239
240
|
source.dispose();
|