[www] token drop performance improvement

This commit is contained in:
Devin Zuczek
2026-10-05 13:10:05 -04:00
parent 8ea72fcdc5
commit 0900bcac25
9 changed files with 645 additions and 78 deletions
+6
View File
@@ -61,6 +61,12 @@ export default defineConfig({
this.sent.push({ playerIds, ephemeral: true, notificationType, data })
return { delivered: 0 }
}
// Recorded one entry per frame, as notifyPlayer records one, so a test
// asserts the same shape whichever path a gift took.
async notifyPlayers(notifications) {
for (const n of notifications) this.sent.push(n)
return { delivered: 0, queued: notifications.length }
}
async broadcast() { return { delivered: 0 } }
async fetch(request) {
if (request.method === 'DELETE') {