Skip to content

Commit 6a02658

Browse files
rwvmaxvp
authored andcommitted
fix: Cloudflare Containers Stateless Instances getRandom needs await (#24194)
1 parent 4a4213f commit 6a02658

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/content/docs/containers/examples/stateless.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ class Backend extends Container {
2323
export default {
2424
async fetch(request: Request, env: Env): Promise<Response> {
2525
// note: "getRandom" to be replaced with latency-aware routing in the near future
26-
const containerInstance = getRandom(env.BACKEND, INSTANCE_COUNT);
26+
const containerInstance = await getRandom(env.BACKEND, INSTANCE_COUNT);
2727
return containerInstance.fetch(request);
2828
},
2929
};

0 commit comments

Comments
 (0)