Increase query timeout of feeds

This commit is contained in:
Alex Gleason 2024-07-02 09:22:59 +01:00
parent fd769c125c
commit c7092f5d2d
No known key found for this signature in database
GPG key ID: 7211D1F99744FBB7

View file

@ -60,9 +60,10 @@ const suggestedTimelineController: AppController = async (c) => {
async function renderStatuses(c: AppContext, filters: NostrFilter[]) { async function renderStatuses(c: AppContext, filters: NostrFilter[]) {
const { signal } = c.req.raw; const { signal } = c.req.raw;
const store = c.get('store'); const store = c.get('store');
const opts = { signal, timeout: 5000 };
const events = await store const events = await store
.query(filters, { signal }) .query(filters, opts)
.then((events) => hydrateEvents({ events, store, signal })); .then((events) => hydrateEvents({ events, store, signal }));
if (!events.length) { if (!events.length) {