"vscode:/vscode.git/clone" did not exist on "faa48887471d862bfed66c32850304f6e409e86c"
Commit fcdcb12f authored by jon-chuang's avatar jon-chuang Committed by GitHub
Browse files

fix: prefill queue handler async task should not silently error (#442)

parent 8621d914
......@@ -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):
......
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