MelerEcckmanLawlerM
Denoβ€’9mo agoβ€’
2 replies
MelerEcckmanLawler

kv.watch() not working

for await (const entry of kv.watch([['chat']])) console.log(entry);

The only thing this does is immediately prints the following:
[ { key: [ "chat" ], value: null, versionstamp: null } ]

What it's supposed to do is print each new entry added to the database under key "chat", but it doesn't. I can prove the entries are being added by running this inside an interval every couple seconds:
console.log(await Array.fromAsync(kv.list({ prefix: ['chat'] })));
Was this page helpful?