mirror of
https://gitlab.com/soapbox-pub/ditto.git
synced 2025-12-06 03:19:46 +00:00
Fix stat inflation
This commit is contained in:
parent
593cedba06
commit
55ee8eaf74
1 changed files with 4 additions and 2 deletions
|
|
@ -119,8 +119,10 @@ async function storeEvent(event: DittoEvent, signal?: AbortSignal): Promise<unde
|
|||
const store = await Storages.db();
|
||||
const kysely = await Storages.kysely();
|
||||
|
||||
await updateStats({ event, store, kysely }).catch(debug);
|
||||
await store.event(event, { signal });
|
||||
await kysely.transaction().execute(async (kysely) => {
|
||||
await updateStats({ event, store, kysely });
|
||||
await store.event(event, { signal });
|
||||
});
|
||||
}
|
||||
|
||||
/** Parse kind 0 metadata and track indexes in the database. */
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue