@@ -50,7 +50,7 @@ def init():
5050@app .route ("/" )
5151def index ():
5252 """Returns the demo UI."""
53- global _cpu_burner , _is_healthy
53+ global _cpu_burner , _is_healthy # noqa: F824
5454 return render_template (
5555 "index.html" ,
5656 hostname = gethostname (),
@@ -68,15 +68,15 @@ def health():
6868 Returns:
6969 HTTP status 200 if 'healthy', HTTP status 500 if 'unhealthy'
7070 """
71- global _is_healthy
71+ global _is_healthy # noqa: F824
7272 template = render_template ("health.html" , healthy = _is_healthy )
7373 return make_response (template , 200 if _is_healthy else 500 )
7474
7575
7676@app .route ("/makeHealthy" )
7777def make_healthy ():
7878 """Sets the server to simulate a 'healthy' status."""
79- global _cpu_burner , _is_healthy
79+ global _cpu_burner , _is_healthy # noqa: F824
8080 _is_healthy = True
8181
8282 template = render_template (
@@ -95,7 +95,7 @@ def make_healthy():
9595@app .route ("/makeUnhealthy" )
9696def make_unhealthy ():
9797 """Sets the server to simulate an 'unhealthy' status."""
98- global _cpu_burner , _is_healthy
98+ global _cpu_burner , _is_healthy # noqa: F824
9999 _is_healthy = False
100100
101101 template = render_template (
@@ -114,7 +114,7 @@ def make_unhealthy():
114114@app .route ("/startLoad" )
115115def start_load ():
116116 """Sets the server to simulate high CPU load."""
117- global _cpu_burner , _is_healthy
117+ global _cpu_burner , _is_healthy # noqa: F824
118118 _cpu_burner .start ()
119119
120120 template = render_template (
@@ -133,7 +133,7 @@ def start_load():
133133@app .route ("/stopLoad" )
134134def stop_load ():
135135 """Sets the server to stop simulating CPU load."""
136- global _cpu_burner , _is_healthy
136+ global _cpu_burner , _is_healthy # noqa: F824
137137 _cpu_burner .stop ()
138138
139139 template = render_template (
0 commit comments