I'm having trouble understanding how to use the async: true
flag in the createExecution function. Do I need to create some sort of queue system? I can't find any examples of how to do this for Cloud + Web (Node.js)
When I try to run the following function multiple times without async: true
It's only running the first one. If I add async: true
I get a server error: Error: Function execution failed with status 0:
try {
const execution = await functions.createExecution(
"6667045d000c65a2ddcb",
id,
true
)
if (
execution.responseStatusCode >= 200 &&
execution.responseStatusCode < 300
) {
return JSON.parse(execution.responseBody)
} else {
throw new Error(
`Function execution failed with status ${execution.responseStatusCode}: ${execution.responseBody}`
)
}
} catch (error) {
console.error("Error fetching payment from server: ", error)
throw error
}
}
After playing around with some polling, I'm now getting an empty responseBody
which might be tied to this issue: https://github.com/appwrite/appwrite/issues/6256
I guess I need to completely rethink they way I'm doing this
Recommended threads
- Cant configure email templates
i configure it on the console, and when i send the OTP, it sends with appwrite's email (instead of custom smtp) and with the branding, but i have the Pro (educa...
- Need help with createExecution function
Hi, Need some help understanding createExecution. When requesting function execution via createExecution, the function handler arguments are incorrect and rese...
- Query Appwrite
Hello, I have a question regarding Queries in Appwrite. If I have a string "YYYY-MM", how can I query the $createdAt column to match this filter?