streaming: actually hydrate with optimizer

This commit is contained in:
Alex Gleason 2024-05-14 19:11:38 -05:00
parent 477ee8b124
commit 2fd50261f9
No known key found for this signature in database
GPG Key ID: 7211D1F99744FBB7
1 changed files with 2 additions and 2 deletions

View File

@ -68,8 +68,8 @@ const streamingController: AppController = (c) => {
if (!filter) return;
try {
const db = await Storages.db();
const pubsub = await Storages.pubsub();
const optimizer = await Storages.optimizer();
for await (const msg of pubsub.req([filter], { signal: controller.signal })) {
if (msg[0] === 'EVENT') {
@ -77,7 +77,7 @@ const streamingController: AppController = (c) => {
await hydrateEvents({
events: [event],
store: db,
store: optimizer,
signal: AbortSignal.timeout(1000),
});