From b4b0b6bf62edd9742c1152f1281755e503c551cf Mon Sep 17 00:00:00 2001 From: zkldi <20380519+zkldi@users.noreply.github.com> Date: Thu, 2 Dec 2021 10:45:45 +0000 Subject: [PATCH] Make USC and BMS databases sync charts instead of ignoring em --- server/scripts/sync-database/sync-database.ts | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/server/scripts/sync-database/sync-database.ts b/server/scripts/sync-database/sync-database.ts index 084d98ffa..8797e742d 100644 --- a/server/scripts/sync-database/sync-database.ts +++ b/server/scripts/sync-database/sync-database.ts @@ -112,14 +112,16 @@ const syncInstructions: SyncInstructions[] = [ // Since the USC and BMS databases are managed Bokutachi-side, we // shouldn't be honoring any sort of updates from tachi-database-seeds // aside from an initial one. - const isInitial = (await collection.findOne()) === null; + // + // However, in practice, these syncs are the best way to actually update + // issues in the database. + // We're going to disable this anyway. + // const isInitial = (await collection.findOne()) === null; - if (isInitial) { - const r = await GenericUpsert(charts, collection, "chartID", logger, true); + const r = await GenericUpsert(charts, collection, "chartID", logger, false); - if (r) { - await InitaliseFolderChartLookup(); - } + if (r) { + await InitaliseFolderChartLookup(); } }, },