🐛 Attempt to fix waitUntil
This commit is contained in:
@@ -32,7 +32,7 @@ export default async function handler(
|
||||
// @ts-ignore
|
||||
const ctx = globalThis[Symbol.for('@vercel/request-context')]
|
||||
if (ctx?.get?.().waitUntil) {
|
||||
ctx.get().waitUntil(() => processWhatsAppReply(entry))
|
||||
ctx.get().waitUntil(processWhatsAppReply(entry))
|
||||
return res.status(200).json({ message: 'Message is being processed.' })
|
||||
}
|
||||
console.log('Processing message')
|
||||
|
||||
@@ -56,9 +56,7 @@ export default async function handler(
|
||||
if (ctx?.get?.().waitUntil) {
|
||||
ctx
|
||||
.get()
|
||||
.waitUntil(() =>
|
||||
processWhatsAppReply({ entry, workspaceId, credentialsId })
|
||||
)
|
||||
.waitUntil(processWhatsAppReply({ entry, workspaceId, credentialsId }))
|
||||
return res.status(200).json({ message: 'Message is being processed.' })
|
||||
}
|
||||
const { message } = await processWhatsAppReply({
|
||||
|
||||
Reference in New Issue
Block a user