Skip to content

Commit

Permalink
Merge pull request #82 from perimetre/dev
Browse files Browse the repository at this point in the history
feat: turn off storage sync
  • Loading branch information
yanikproulx authored May 6, 2024
2 parents 83fdbc8 + 342c5da commit ad9d17f
Showing 1 changed file with 11 additions and 11 deletions.
22 changes: 11 additions & 11 deletions src/services/marathon/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 },
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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 },
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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({
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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';
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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;
Expand Down

0 comments on commit ad9d17f

Please sign in to comment.