MCPcopy Create free account
hub / github.com/cloudflare/meet / queue

Function queue

app/queue.ts:4–19  ·  view source on GitHub ↗
(batch: MessageBatch<ChatCard>, env: Env)

Source from the content-addressed store, hash-verified

2import type { ChatCard } from './types/GoogleChatApi'
3
4export const queue = async (batch: MessageBatch<ChatCard>, env: Env) => {
5 for (const message of batch.messages) {
6 if (env.FEEDBACK_URL) {
7 try {
8 await fetch(env.FEEDBACK_URL, {
9 method: 'post',
10 body: JSON.stringify(message.body),
11 })
12 } catch (error) {
13 message.retry()
14 }
15 } else {
16 console.log('would have posted to feedback URL', message)
17 }
18 }
19}

Callers

nothing calls this directly

Calls 2

fetchFunction · 0.85
logMethod · 0.80

Tested by

no test coverage detected