-
Notifications
You must be signed in to change notification settings - Fork 261
Add missing execution info to Functions doc #2147
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
appwrite.ioProject ID: Note You can use Avatars API to generate QR code for any text or URLs. |
The preview deployment failed. 🔴 Last updated at: 2025-07-02 13:18:55 CET |
6e3c6b4
to
83e3ebc
Compare
* `create-execution [options]` | ||
* Trigger a function execution. The returned object will return you the current execution status. You can ping the 'Get Execution' endpoint to get updates on the current execution status. Once this endpoint is called, your function execution process will start asynchronously. | ||
* `create-execution [options]` | ||
* Trigger a function execution. The returned object will return you the current execution status. You can ping the 'Get Execution' endpoint to get updates on the current execution status. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like this needs to be updated too. They should match up. Maybe we should just change it to:
* Trigger a function execution. The returned object will return you the current execution status. You can ping the 'Get Execution' endpoint to get updates on the current execution status. | |
* Trigger a function execution. |
functionId: "<FUNCTION_ID>" | ||
body: "<BODY>" // optional | ||
async: false // optional | ||
path: "<PATH>" // optional | ||
method: "GET" // optional | ||
functionId: "<FUNCTION_ID>" | ||
body: "<BODY>" // optional | ||
async: false // optional | ||
path: "<PATH>" // optional | ||
method: "GET" // optional |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nice job with the white space cleanup
@@ -11,6 +11,42 @@ Appwrite Functions can be executed in several ways. | |||
Executions can be invoked through the Appwrite SDK and visiting its REST endpoint. Functions can also be triggered by events and scheduled executions. | |||
Here are all the different ways to consume your Appwrite Functions. | |||
|
|||
# Execution modes {% #execution-modes %} | |||
|
|||
Appwrite Functions support two execution modes: **synchronous** and **asynchronous**. Understanding the difference between these modes is important for building efficient applications. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's try to keep docs concise and to the point:
Appwrite Functions support two execution modes: **synchronous** and **asynchronous**. Understanding the difference between these modes is important for building efficient applications. | |
Appwrite Functions support two execution modes: **synchronous** and **asynchronous**. |
|
||
Synchronous executions: | ||
- Return response bodies and headers directly to the client | ||
- Have a **30-second timeout limit** to prevent long-running requests from blocking Appwrite workers |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's reword this to something like:
- Have a **30-second timeout limit** to prevent long-running requests from blocking Appwrite workers | |
- Have a **30-second timeout limit** to discourage slow API calls from apps causing poor user experience |
- Return response bodies and headers directly to the client | ||
- Have a **30-second timeout limit** to prevent long-running requests from blocking Appwrite workers | ||
- Are ideal for real-time operations where you need immediate response data | ||
- Work best for lightweight operations that complete quickly |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ideally, all function executions should be lightweight and complete quickly. That's the suggestion for all serverless functions.
Asynchronous executions: | ||
- Have no timeout limitations beyond your function's configured timeout | ||
- Do **not store** response bodies and headers and cannot be retrieved later | ||
- Are ideal for long-running tasks, background processing, and event-driven workflows |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
long-running tasks,
I wouldn't say long-running. Definitely if it needs to be more than 30 seconds. I don't want to encourage long running executions.
What does this PR do?
Updates Functions documentation to include some missing info about executions
Test Plan
/docs/products/functions/executions
/docs/products/functions/execute
/docs/tooling/command-line/functions#commands
Related PRs and Issues
DRL-1514