From 1589ee1b6f879e967f4866941bf92076721c8a07 Mon Sep 17 00:00:00 2001 From: cblmemo Date: Thu, 26 Oct 2023 22:54:33 -0700 Subject: [PATCH] fix --- sky/serve/controller.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/sky/serve/controller.py b/sky/serve/controller.py index 5d3f9b4184a..d82192c4ec6 100644 --- a/sky/serve/controller.py +++ b/sky/serve/controller.py @@ -3,7 +3,6 @@ Responsible for autoscaling and replica management. """ import argparse -import asyncio import base64 import logging import pickle @@ -52,9 +51,9 @@ def __init__(self, def run(self) -> None: @self.app.post('/controller/update_num_requests') - def update_num_requests(request: fastapi.Request): + async def update_num_requests(request: fastapi.Request): # await request - request_data = asyncio.run(request.json()) + request_data = await request.json() # get request data num_requests = request_data['num_requests'] logger.info(f'Received request: {request_data}')