try-catch trending tags cron

This commit is contained in:
Alex Gleason 2024-07-23 22:32:16 -05:00
parent 5ebde99320
commit 7949c95f77
No known key found for this signature in database
GPG key ID: 7211D1F99744FBB7

View file

@ -72,6 +72,7 @@ export async function updateTrendingTags(
const tagNames = aliases ? [tagName, ...aliases] : [tagName];
try {
const trends = await getTrendingTagValues(kysely, tagNames, {
kinds,
since: yesterday,
@ -99,6 +100,9 @@ export async function updateTrendingTags(
await handleEvent(label, signal);
console.info(`Trending ${l} updated.`);
} catch (e) {
console.error(`Error updating trending ${l}: ${e.message}`);
}
}
/** Update trending pubkeys. */