diff --git a/ci/L0_backend_vllm/metrics_test/test.sh b/ci/L0_backend_vllm/metrics_test/test.sh index 884be62..a9a4db9 100755 --- a/ci/L0_backend_vllm/metrics_test/test.sh +++ b/ci/L0_backend_vllm/metrics_test/test.sh @@ -75,11 +75,11 @@ run_test() { fi fi + set -e + # TODO: Non-graceful shutdown when metrics are enabled. kill $SERVER_PID wait $SERVER_PID - - set -e } RET=0 diff --git a/src/model.py b/src/model.py index 46c35a2..4c351f1 100644 --- a/src/model.py +++ b/src/model.py @@ -800,7 +800,7 @@ def _check_health(self, requests): def finalize(self): self.logger.log_info("[vllm] Issuing finalize to vllm backend") - self._llm_engine_shutdown_event.set() + self._event_loop.call_soon_threadsafe(self._llm_engine_shutdown_event.set) # Shutdown the event thread. if self._event_thread is not None: