Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
OpenDAS
dynamo
Commits
fcdcb12f
"vscode:/vscode.git/clone" did not exist on "faa48887471d862bfed66c32850304f6e409e86c"
Commit
fcdcb12f
authored
Mar 30, 2025
by
jon-chuang
Committed by
GitHub
Mar 30, 2025
Browse files
fix: prefill queue handler async task should not silently error (#442)
parent
8621d914
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
1 deletion
+11
-1
examples/llm/components/prefill_worker.py
examples/llm/components/prefill_worker.py
+11
-1
No files found.
examples/llm/components/prefill_worker.py
View file @
fcdcb12f
...
...
@@ -16,6 +16,7 @@
import
asyncio
import
os
import
sys
from
pydantic
import
BaseModel
from
utils.nixl
import
NixlMetadataStore
...
...
@@ -84,7 +85,16 @@ class PrefillWorker:
self
.
_metadata_store
=
NixlMetadataStore
(
"dynamo"
,
runtime
)
await
self
.
_metadata_store
.
put
(
metadata
.
engine_id
,
metadata
)
task
=
asyncio
.
create_task
(
self
.
prefill_queue_handler
())
task
.
add_done_callback
(
lambda
_
:
print
(
"prefill queue handler created"
))
def
prefill_queue_handler_cb
(
fut
):
try
:
fut
.
result
()
print
(
"prefill queue handler exited successfully"
)
except
Exception
as
e
:
print
(
f
"[ERROR] prefill queue handler failed:
{
e
!
r
}
"
)
sys
.
exit
(
1
)
task
.
add_done_callback
(
prefill_queue_handler_cb
)
print
(
"PrefillWorker initialized"
)
async
def
prefill_queue_handler
(
self
):
...
...
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