From e5c8f8c14625aa2ec2766d8a9f1afa867fec4b30 Mon Sep 17 00:00:00 2001 From: Alex Gleason Date: Sun, 31 Dec 2023 12:48:49 -0600 Subject: [PATCH] Bump the timeout a bit when fetching an individual status --- src/controllers/api/statuses.ts | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/controllers/api/statuses.ts b/src/controllers/api/statuses.ts index cf0446a3..cdcd3049 100644 --- a/src/controllers/api/statuses.ts +++ b/src/controllers/api/statuses.ts @@ -29,7 +29,12 @@ const createStatusSchema = z.object({ const statusController: AppController = async (c) => { const id = c.req.param('id'); - const event = await getEvent(id, { kind: 1, relations: ['author', 'event_stats', 'author_stats'] }); + const event = await getEvent(id, { + kind: 1, + relations: ['author', 'event_stats', 'author_stats'], + signal: AbortSignal.timeout(1500), + }); + if (event) { return c.json(await renderStatus(event, c.get('pubkey'))); }