mirror of
https://github.com/PaddlePaddle/FastDeploy.git
synced 2025-12-24 13:28:13 +08:00
FD registers to the Router only once. (#5431)
Some checks failed
CE Compile Job / ce_job_pre_check (push) Has been cancelled
CE Compile Job / print_ce_job_pre_check_outputs (push) Has been cancelled
CE Compile Job / FD-Clone-Linux (push) Has been cancelled
CE Compile Job / Show Code Archive Output (push) Has been cancelled
CE Compile Job / BUILD_SM8090 (push) Has been cancelled
CE Compile Job / BUILD_SM8689 (push) Has been cancelled
CE Compile Job / CE_UPLOAD (push) Has been cancelled
Deploy GitHub Pages / deploy (push) Has been cancelled
Some checks failed
CE Compile Job / ce_job_pre_check (push) Has been cancelled
CE Compile Job / print_ce_job_pre_check_outputs (push) Has been cancelled
CE Compile Job / FD-Clone-Linux (push) Has been cancelled
CE Compile Job / Show Code Archive Output (push) Has been cancelled
CE Compile Job / BUILD_SM8090 (push) Has been cancelled
CE Compile Job / BUILD_SM8689 (push) Has been cancelled
CE Compile Job / CE_UPLOAD (push) Has been cancelled
Deploy GitHub Pages / deploy (push) Has been cancelled
This commit is contained in:
@@ -1294,12 +1294,11 @@ class EngineService:
|
||||
def _register():
|
||||
while True:
|
||||
try:
|
||||
time.sleep(sleep_seconds)
|
||||
|
||||
api_server_host = self.cfg.router_config.api_server_host
|
||||
api_server_port = self.cfg.router_config.api_server_port
|
||||
api_server_url = f"http://{api_server_host}:{api_server_port}"
|
||||
if not check_service_health(api_server_url):
|
||||
time.sleep(sleep_seconds)
|
||||
continue
|
||||
|
||||
router_url = self.cfg.router_config.router
|
||||
@@ -1308,11 +1307,16 @@ class EngineService:
|
||||
json=self.cfg.register_info,
|
||||
timeout=timeout,
|
||||
)
|
||||
if not resp.ok:
|
||||
|
||||
if resp.ok:
|
||||
llm_logger.info("Successfully registered to the router!")
|
||||
break
|
||||
else:
|
||||
llm_logger.error(
|
||||
f"Router registration failed: {resp.status_code}, "
|
||||
f"{resp.text}, {self.cfg.register_info}"
|
||||
)
|
||||
time.sleep(sleep_seconds)
|
||||
except requests.exceptions.RequestException as e:
|
||||
llm_logger.error(f"Register to router request error: {e}")
|
||||
except Exception as e:
|
||||
|
||||
Reference in New Issue
Block a user