From 7c77d8719fd2d0d1307105c1f6ea2d25be69d4df Mon Sep 17 00:00:00 2001 From: Daniel Bachler Date: Wed, 7 Aug 2024 11:46:50 +0200 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9D=20fix=20minor=20issues?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- adminSiteServer/chartConfigR2Helpers.ts | 1 - devTools/syncGraphersToR2/syncGraphersToR2.ts | 5 +++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/adminSiteServer/chartConfigR2Helpers.ts b/adminSiteServer/chartConfigR2Helpers.ts index 219c7b8914b..21ca2c4e162 100644 --- a/adminSiteServer/chartConfigR2Helpers.ts +++ b/adminSiteServer/chartConfigR2Helpers.ts @@ -17,7 +17,6 @@ import { Base64String, excludeUndefined, JsonError, - getMd5HashBase64, } from "@ourworldindata/utils" import { logErrorAndMaybeSendToBugsnag } from "../serverUtils/errorLog.js" import { createHash } from "crypto" diff --git a/devTools/syncGraphersToR2/syncGraphersToR2.ts b/devTools/syncGraphersToR2/syncGraphersToR2.ts index e0fe4fe3e71..9d270e4d75f 100644 --- a/devTools/syncGraphersToR2/syncGraphersToR2.ts +++ b/devTools/syncGraphersToR2/syncGraphersToR2.ts @@ -134,7 +134,7 @@ async function syncWithR2( const full = fullConfigMap.get(id) if (full === undefined) { console.error(`Full config not found for id ${id}`) - return + return null } try { const putObjectCommandInput: PutObjectCommandInput = { @@ -148,10 +148,11 @@ async function syncWithR2( new PutObjectCommand(putObjectCommandInput) ) else console.log("Would have upserted", key) + progressBar.tick() + return null } catch (err) { return err } - progressBar.tick() }) const promiseResults = await Promise.allSettled(uploadPromises) const batchErrors = promiseResults