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