File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed
src/content/docs/workers/languages/python Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -90,14 +90,14 @@ def to_js(obj):
9090
9191class Default (WorkerEntrypoint ):
9292 async def fetch (self , request ):
93- # Bindings are available on the 'env' parameter
93+ # Bindings are available on the 'env' attribute
9494 # https://developers.cloudflare.com/queues/
9595
9696 # The default contentType is "json"
9797 # We can also pass plain text strings
98- await env.QUEUE .send(" hello" , contentType = " text" )
98+ await self . env.QUEUE .send(" hello" , contentType = " text" )
9999 # Send a JSON payload
100- await env.QUEUE .send(to_js({" hello" : " world" }))
100+ await self . env.QUEUE .send(to_js({" hello" : " world" }))
101101
102102 # Return a response
103103 return Response.json({" write" : " success" })
@@ -110,7 +110,7 @@ from workers import WorkerEntrypoint, Response
110110
111111class Default (WorkerEntrypoint ):
112112 async def fetch (self , request ):
113- results = await env.DB .prepare(" PRAGMA table_list" ).run()
113+ results = await self . env.DB .prepare(" PRAGMA table_list" ).run()
114114 # Return a JSON response
115115 return Response.json(results)
116116```
You can’t perform that action at this time.
0 commit comments