Commit 72206c32 authored by nanahira's avatar nanahira

don't reupload if no success

parent 0f098f0c
Pipeline #5435 passed with stages
in 3 minutes and 12 seconds
......@@ -140,6 +140,10 @@ export class MirrorService extends ConsoleLogger {
}
this.log(`Uploading ${archives.length} archives.`);
const uploadResults = _.flatten(await Promise.all(archives.map((a) => this.saveMirrorFromPath(a))));
if (!uploadResults) {
this.error(`All uploads failed, exiting.`);
return false;
}
this.log(`Saving ${uploadResults.length} mirror records.`);
await this.db.transaction(async (edb) => {
const entTrunks = _.chunk(uploadResults, 20000);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment