Unverified Commit 8d54eb7e authored by Jacky's avatar Jacky Committed by GitHub
Browse files

fix: Example hello_world.py Context naming (#2833)

parent e432ae4a
...@@ -18,7 +18,7 @@ import logging ...@@ -18,7 +18,7 @@ import logging
import uvloop import uvloop
from dynamo.runtime import DistributedRuntime, PyContext, dynamo_endpoint, dynamo_worker from dynamo.runtime import Context, DistributedRuntime, dynamo_endpoint, dynamo_worker
from dynamo.runtime.logging import configure_dynamo_logging from dynamo.runtime.logging import configure_dynamo_logging
logger = logging.getLogger(__name__) logger = logging.getLogger(__name__)
...@@ -26,7 +26,7 @@ configure_dynamo_logging(service_name="backend") ...@@ -26,7 +26,7 @@ configure_dynamo_logging(service_name="backend")
@dynamo_endpoint(str, str) @dynamo_endpoint(str, str)
async def content_generator(request: str, context: PyContext): async def content_generator(request: str, context: Context):
logger.info(f"Received request: {request} with `id={context.id()}`") logger.info(f"Received request: {request} with `id={context.id()}`")
for word in request.split(","): for word in request.split(","):
await asyncio.sleep(1) await asyncio.sleep(1)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment