yetessam commited on
Commit
e20f133
·
verified ·
1 Parent(s): e63689d

Update status_check.py

Browse files
Files changed (1) hide show
  1. status_check.py +14 -12
status_check.py CHANGED
@@ -101,18 +101,20 @@ def run_status_checks():
101
 
102
  # Wake it up before health check
103
  wake_up_successful = wake_up_endpoint(endpoint_uri, ui)
104
-
105
- if not wake_up_successful:
106
- ui.append("Warning: Could not wake up the endpoint. Continuing.")
 
 
107
  else:
108
  ui.append("✅ End point responded OK.")
109
 
110
- is_healthy, status_info = check_model_endpoint(endpoint_uri) # Test the endpoint
111
-
112
- if not is_healthy:
113
- from checks.failed_check import create_failed_gradio_ui
114
- interface = create_failed_gradio_ui(status_info)
115
- interface.launch(show_error=True, share=True)
116
- return None
117
-
118
- return endpoint_uri
 
101
 
102
  # Wake it up before health check
103
  wake_up_successful = wake_up_endpoint(endpoint_uri, ui)
104
+ success, error_msg = wake_up_endpoint(endpoint_uri, ui)
105
+ i
106
+ if not success:
107
+ ui.append("Warning: Could not wake up the endpoint. Exiting.")
108
+
109
  else:
110
  ui.append("✅ End point responded OK.")
111
 
112
+ is_healthy, status_info = check_model_endpoint(endpoint_uri) # Test the endpoint
113
+
114
+ if not is_healthy:
115
+ from checks.failed_check import create_failed_gradio_ui
116
+ interface = create_failed_gradio_ui(status_info)
117
+ interface.launch(show_error=True, share=True)
118
+ return None
119
+
120
+ return endpoint_uri