Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
OpenDAS
dynamo
Commits
8d54eb7e
Unverified
Commit
8d54eb7e
authored
Sep 03, 2025
by
Jacky
Committed by
GitHub
Sep 03, 2025
Browse files
fix: Example hello_world.py Context naming (#2833)
parent
e432ae4a
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
examples/runtime/hello_world/hello_world.py
examples/runtime/hello_world/hello_world.py
+2
-2
No files found.
examples/runtime/hello_world/hello_world.py
View file @
8d54eb7e
...
@@ -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
:
Py
Context
):
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
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment