1101 (exception) only kills the request, 1102 (resources) kills the isolate.
1101 (exception) only kills the request, 1102 (resources) kills the isolate.
14 Replies
Unknown User•2y ago
Message Not Public
Sign In & Join Server To View
When the client disconnects, all tasks associated with that client request are canceled. Use event.waitUntil() to delay cancellation for another 30 seconds or until the promise passed to waitUntil() completes.It seems so I don't know if that means disconnects as in the response body has been fully read, or a mid-request disconnect.
Unknown User•2y ago
Message Not Public
Sign In & Join Server To View
is there a better way to group thinks like kv_namespaces under a specific env, withoud the need to use env.... each time ?

Kinda confused why my DO alarm is not being triggered every 10 seconds
In one of my DO endpoints I have this
checking the CF logs, it only gets triggered once (in 10 seconds after creation)
There’s an easy solution to all the TOML ick: Use wrangler.json
Hello, Is
fetch
inside workers automatically cache POST request with custom cacheKey
?
Or I have to clone the request and change the method to GET then use the Cache API ?You need to change the method since the cache layer the api interacts with rejects and will ignore POST requests
Example here https://developers.cloudflare.com/workers/examples/cache-post-request/
Cache POST requests · Cloudflare Workers docs
Documentation for Cloudflare Workers, a serverless execution environment that allows you to create entirely new applications or augment existing ones …
In this example, can I use
cf: { cacheKey: hash }
instead of pathname ?
I just test it, It seem that Cache API respect the cf
in the request object.what happens if a worker is in a middle of execution and a deploy just takes place? does the process gets terminated immediately?
Unknown User•2y ago
Message Not Public
Sign In & Join Server To View
By deploy do you mean you deploying a new version of the worker or us deploying a runtime update?
For your worker deploys, nothing happens. Open connections continue to run, and complete.
When we push a runtime update, Workers are given 30 seconds to finish before terminating (documented here https://developers.cloudflare.com/workers/platform/limits/#duration)
yes, i was reffering to worker deployment as part of the (wrangler deploy) cmd
Gotcha, then nothing happens. In-flight requests will complete without interruption with the version of the Worker they were started with. Future requests will be served with the new version of the script.