nicknezis commented on a change in pull request #3786:
URL: https://github.com/apache/incubator-heron/pull/3786#discussion_r835706102



##########
File path: heron/tools/tracker/src/python/metricstimeline.py
##########
@@ -73,21 +73,21 @@ async def get_metrics_timeline(
 
   # Form and send the http request.
   url = f"http://{tmanager.host}:{tmanager.stats_port}/stats";
-  with httpx.AsyncClient() as client:
+  async with httpx.AsyncClient() as client:
     result = await client.post(url, 
data=request_parameters.SerializeToString())
 
   # Check the response code - error if it is in 400s or 500s
-  if result.code >= 400:
+  if result.status_code >= 400:
     message = f"Error in getting metrics from Tmanager, code: {result.code}"
     raise Exception(message)
 
   # Parse the response from tmanager.
   response_data = tmanager_pb2.MetricResponse()
   response_data.ParseFromString(result.content)
 
-  if response_data.status.status == common_pb2.NOTOK:
-    if response_data.status.HasField("message"):
-      Log.warn("Received response from Tmanager: %s", 
response_data.status.message)
+  # if response_data.status.status == common_pb2.NOTOK:
+  #   if response_data.status.HasField("message"):
+  #     Log.warn("Received response from Tmanager: %s", 
response_data.status.message)

Review comment:
       Committed these by accident. This is a portion of code I kept putting 
back each time I toggled through the approaches. I'll clean it up. Will leave 
the comment unresolved until I actually do it.




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to