Skip to content

Commit 292e360

Browse files
committed
fix(store): generate links only for selected stores
Resolves: jef#694 Signed-off-by: Jef LeCompte <jeffreylec@gmail.com>
1 parent 85bbaf9 commit 292e360

File tree

4 files changed

+4
-4
lines changed

4 files changed

+4
-4
lines changed

src/store/lookup.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -223,7 +223,7 @@ export async function tryLookupAndLoop(browser: Browser, store: Store) {
223223
return;
224224
}
225225

226-
if (store.linksBuilder) {
226+
if (getStores().has(store.name) && store.linksBuilder) {
227227
const lastRunTime = linkBuilderLastRunTimes[store.name] ?? -1;
228228
const ttl = store.linksBuilder.ttl ?? Number.MAX_SAFE_INTEGER;
229229
if (lastRunTime === -1 || Date.now() - lastRunTime > ttl) {

src/store/model/amazon-uk.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ export const AmazonUk: Store = {
8888
url
8989
});
9090
} else {
91-
logger.error(`Failed to parse card: ${title}`);
91+
logger.error(`Failed to parse card: ${title}`, {url});
9292
}
9393
}
9494

src/store/model/helpers/card.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ export function getProductLinksBuilder(options: LinksBuilderOptions) {
5959
url
6060
});
6161
} else {
62-
logger.error(`Failed to parse card: ${title}`);
62+
logger.error(`Failed to parse card: ${title}`, {url});
6363
}
6464
}
6565

src/store/model/very.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ export const Very: Store = {
6060
url
6161
});
6262
} else {
63-
logger.error(`Failed to parse card: ${title}`);
63+
logger.error(`Failed to parse card: ${title}`, {url});
6464
}
6565
}
6666

0 commit comments

Comments
 (0)