Bump the timeout a bit when fetching an individual status

This commit is contained in:
Alex Gleason 2023-12-31 12:48:49 -06:00
parent 8c52ae80e4
commit e5c8f8c146
No known key found for this signature in database
GPG Key ID: 7211D1F99744FBB7
1 changed files with 6 additions and 1 deletions

View File

@ -29,7 +29,12 @@ const createStatusSchema = z.object({
const statusController: AppController = async (c) => { const statusController: AppController = async (c) => {
const id = c.req.param('id'); 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) { if (event) {
return c.json(await renderStatus(event, c.get('pubkey'))); return c.json(await renderStatus(event, c.get('pubkey')));
} }