deno deploy queues
is there a special flag or setting required for queues in deno deploy , i ceated a very simple example that works locally but not on deploy
app.get('/test', async(c) => {
try {
const env = await load();
const db = await Deno.openKv();
db.listenQueue(async(msg) => {
const data = msg as { channel: string; text: string };
console.log("=== QUEUE MESSAGE === ",data);
await db.set(["test-queues", data.channel], data.text);
});
await db.enqueue({ channel: "C123456", text: "Slack message" }, {
delay: 0,
});
return c.json({
env,
})
} catch (error) {
return c.text("error with queues === "+error.message, 401);
}
})