MorelOriginal post
Rank 1: Thread
I'm currently using Appwrite's functions.createExecution in my project. I want to avoid double requests when multiple actions (like searching or pagination) are triggered in quick succession.
When using fetch, I usually rely on AbortController with a signal to handle this. However, I'm unsure how to implement a similar approach with functions.createExecution.
Here's an example of the code I’m using:
const result = await functions.createExecution(
"name_function",
undefined,
false,
`/path-to-function`,
ExecutionMethod.GET
);
Summary
Issue: Developer using Appwrite's `functions.createExecution` wants to prevent double requests when multiple actions occur in quick succession like searching or pagination.
Solution: To avoid double requests, developers can create a mechanism to track and prevent concurrent executions. One possible approach is to set a flag or use a queue system to manage the execution flow and prevent multiple calls to `functions.createExecution`. This can help ensure that only one request is processed at a time, avoiding duplication of actions.