This commit is contained in:
Jonah Fintz 2024-10-21 08:42:08 +02:00
parent edf715e501
commit 3c2e1e42a7

View file

@ -251,15 +251,15 @@ export default class LanaGrossaIntegration {
// only if updated_at is older than 1 day // only if updated_at is older than 1 day
Stats.IsNew = false; Stats.IsNew = false;
const UpdatedAt = Existing.data[0].updated_at; /* const UpdatedAt = Existing.data[0].updated_at;
if (dayjs().diff(dayjs(UpdatedAt), "day") < 1) { if (dayjs().diff(dayjs(UpdatedAt), "day") < 1) {
console.log( console.log(
"Skipping", "Skipping",
Name, Name,
"as it was updated less than a day ago, also skipping variants", "as it was updated less than a day ago, also skipping variants",
); );
return; return Stats;
} }*/
// update // update
await SupabaseInstance.from("Wool") await SupabaseInstance.from("Wool")
@ -326,10 +326,10 @@ export default class LanaGrossaIntegration {
Stats.VariantsUpdated += 1; Stats.VariantsUpdated += 1;
// only if updated_at is older than 1 day // only if updated_at is older than 1 day
const UpdatedAt = Existing.data[0].updated_at; const UpdatedAt = Existing.data[0].updated_at;
if (dayjs().diff(dayjs(UpdatedAt), "day") < 1) { /* if (dayjs().diff(dayjs(UpdatedAt), "day") < 1) {
console.log("Skipping Variant", EAN, "as it was updated less than a day ago"); console.log("Skipping Variant", EAN, "as it was updated less than a day ago");
continue; continue;
} }*/
// update // update
await SupabaseInstance.from("WoolVariants") await SupabaseInstance.from("WoolVariants")