You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Alternatively you can specify another asynchronous or synchronous function to run instead.
73
73
74
+
### Cancel async invocations
75
+
76
+
Sometimes you might need to cancel an ongoing or queued invocation. Asynchronous invocations can be cancelled by making an HTTP `DELETE` request to `/async-function/<name>/<call-id>`. The call id is the X-Call-Id header that was returned when submitting the async invocation.
A `202 Accepted` message will be issued if the request is successful.
85
+
86
+
Reasons why you might need to cancel an async request:
87
+
88
+
- Cancel long running tasks.
89
+
- Cancel failing invocations, e.g due to an invalid payload, that would otherwise be retried by the queue-worker until the max retry limit is reached.
90
+
- Cancel all invocations that are part of a batch if one fails.
91
+
92
+
74
93
### Making an asynchronous call from another function
75
94
76
95
You cannot use the address `127.0.0.1` when calling the gateway from within a function, because this refers to the function's container and local network, not the gateway's.
Copy file name to clipboardExpand all lines: docs/reference/rest-api.md
+14Lines changed: 14 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -132,6 +132,20 @@ You can expose Functions with a REST-like mapping or on custom subdomains with t
132
132
133
133
* See also: [Custom domains and REST-like mappings for functions](/reference/tls-functions)
134
134
135
+
### Cancel an async invocation
136
+
137
+
To cancel an asynchronous function invocation an HTTP `DELETE` request can be made to the async function endpoint with the call id of the invocation that needs to be cancelled as a path parameter: `/async-function/<name>.<namespace>/<call-id>`
0 commit comments