From 342c5dad9fa24ecfe6dead5605a00b65fa8b5a8b Mon Sep 17 00:00:00 2001 From: AssisrMatheus Date: Mon, 6 May 2024 13:41:56 -0400 Subject: [PATCH] feat: turn off storage sync --- src/services/marathon/index.ts | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/src/services/marathon/index.ts b/src/services/marathon/index.ts index 211e643..3621dac 100644 --- a/src/services/marathon/index.ts +++ b/src/services/marathon/index.ts @@ -330,7 +330,7 @@ export const marathonService = ({ db }: MarathonServiceDependencies) => { const translationIds = currentCollection.translations.map((x) => x.id); const thumbnailUrl = collectionEdge?.node?.image?.fullpath; - if (thumbnailUrl) storageSyncQueue.push(thumbnailUrl); + // if (thumbnailUrl) storageSyncQueue.push(thumbnailUrl); await db.collection.update({ where: { externalId: currentCollection.externalId }, @@ -372,7 +372,7 @@ export const marathonService = ({ db }: MarathonServiceDependencies) => { const thumbnailUrl = collectionEdge?.node?.image?.fullpath?.trim(); - if (thumbnailUrl) storageSyncQueue.push(thumbnailUrl); + // if (thumbnailUrl) storageSyncQueue.push(thumbnailUrl); return { // Casting because we're sure, since there's a filter right above @@ -488,7 +488,7 @@ export const marathonService = ({ db }: MarathonServiceDependencies) => { const thumbnailUrl = drawerTypeEdge?.node?.image?.fullpath; - if (thumbnailUrl) storageSyncQueue.push(thumbnailUrl); + // if (thumbnailUrl) storageSyncQueue.push(thumbnailUrl); await db.type.update({ where: { externalId: currentDrawerType.externalId }, @@ -530,7 +530,7 @@ export const marathonService = ({ db }: MarathonServiceDependencies) => { const thumbnailUrl = drawerTypeEdge?.node?.image?.fullpath?.trim(); - if (thumbnailUrl) storageSyncQueue.push(thumbnailUrl); + // if (thumbnailUrl) storageSyncQueue.push(thumbnailUrl); return { // Casting because we're filtering right above @@ -643,7 +643,7 @@ export const marathonService = ({ db }: MarathonServiceDependencies) => { const thumbnailUrl = finishEdge?.node?.image?.fullpath; - if (thumbnailUrl) storageSyncQueue.push(thumbnailUrl); + // if (thumbnailUrl) storageSyncQueue.push(thumbnailUrl); try { console.dir({ @@ -708,7 +708,7 @@ export const marathonService = ({ db }: MarathonServiceDependencies) => { const thumbnailUrl = finishEdge?.node?.image?.fullpath?.trim(); - if (thumbnailUrl) storageSyncQueue.push(thumbnailUrl); + // if (thumbnailUrl) storageSyncQueue.push(thumbnailUrl); return { // Casing since we're filtering right above @@ -1023,7 +1023,7 @@ export const marathonService = ({ db }: MarathonServiceDependencies) => { } }); - if (moduleRest.thumbnailUrl) storageSyncQueue.push(moduleRest.thumbnailUrl); + // if (moduleRest.thumbnailUrl) storageSyncQueue.push(moduleRest.thumbnailUrl); } } else { status = 'updated'; @@ -1072,7 +1072,7 @@ export const marathonService = ({ db }: MarathonServiceDependencies) => { } }); - if (moduleRest.thumbnailUrl) storageSyncQueue.push(moduleRest.thumbnailUrl); + // if (moduleRest.thumbnailUrl) storageSyncQueue.push(moduleRest.thumbnailUrl); // If this module already exists, it already has all the relations, so delete them for them to be created // This is needed in case they completely changed the values here @@ -1500,9 +1500,9 @@ export const marathonService = ({ db }: MarathonServiceDependencies) => { await syncProduct(skipDatabase); console.timeEnd('apiSync'); - console.time('storageSync'); - await storageSync(); - console.timeEnd('storageSync'); + // console.time('storageSync'); + // await storageSync(); + // console.timeEnd('storageSync'); } catch (err) { logging.error(err); throw err;