pipeline: fix reqmeister crash, probably

This commit is contained in:
Alex Gleason 2024-05-03 13:52:11 -05:00
parent 60116ee651
commit 2b2499849f
No known key found for this signature in database
GPG Key ID: 7211D1F99744FBB7
1 changed files with 2 additions and 2 deletions

View File

@ -186,7 +186,7 @@ async function fetchRelatedEvents(event: DittoEvent) {
if (!event.author) {
const signal = AbortSignal.timeout(3000);
Storages.reqmeister.query([{ kinds: [0], authors: [event.pubkey] }], { signal })
.then((events) => events.forEach((event) => handleEvent(event, signal)))
.then((events) => Promise.allSettled(events.map((event) => handleEvent(event, signal))))
.catch(() => {});
}
@ -196,7 +196,7 @@ async function fetchRelatedEvents(event: DittoEvent) {
if (!count) {
const signal = AbortSignal.timeout(3000);
Storages.reqmeister.query([{ ids: [id] }], { signal })
.then((events) => events.forEach((event) => handleEvent(event, signal)))
.then((events) => Promise.allSettled(events.map((event) => handleEvent(event, signal))))
.catch(() => {});
}
}