You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@skywalking.apache.org by GitBox <gi...@apache.org> on 2020/12/10 20:30:51 UTC

[GitHub] [skywalking-python] tom-pytel opened a new pull request #98: [Bugfix] allow pending data to send before exit

tom-pytel opened a new pull request #98:
URL: https://github.com/apache/skywalking-python/pull/98


   Fixed the problem of last pending data not being sent on exit.
   
   <!-- Uncomment the following checklist WHEN AND ONLY WHEN you're adding a new plugin -->
   <!--
   - [ ] Add a test case for the new plugin
   - [ ] Add a component id in [the main repo](https://github.com/apache/skywalking/blob/master/oap-server/server-bootstrap/src/main/resources/component-libraries.yml#L415)
   - [ ] Add a logo in [the UI repo](https://github.com/apache/skywalking-rocketbot-ui/tree/master/src/views/components/topology/assets)
   - [ ] Rebuild the `requirements.txt` by running `tools/env/build_requirements_(linux|windows).sh`
   -->
   


----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [skywalking-python] kezhenxu94 commented on a change in pull request #98: [Bugfix] allow pending data to send before exit

Posted by GitBox <gi...@apache.org>.
kezhenxu94 commented on a change in pull request #98:
URL: https://github.com/apache/skywalking-python/pull/98#discussion_r540626183



##########
File path: skywalking/agent/__init__.py
##########
@@ -38,7 +39,8 @@ def __heartbeat():
 def __report():
     while not __finished.is_set():
         if connected():
-            __protocol.report(__queue)  # is blocking actually
+            while __protocol.report(__queue):  # blocking but has timeout
+                pass

Review comment:
       So maybe this is unnecessary after your latest commit? And there is no timeout actually (the comment says it has, which is confusing)




----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [skywalking-python] tom-pytel commented on a change in pull request #98: [Bugfix] allow pending data to send before exit

Posted by GitBox <gi...@apache.org>.
tom-pytel commented on a change in pull request #98:
URL: https://github.com/apache/skywalking-python/pull/98#discussion_r540645702



##########
File path: skywalking/agent/__init__.py
##########
@@ -38,7 +39,8 @@ def __heartbeat():
 def __report():
     while not __finished.is_set():
         if connected():
-            __protocol.report(__queue)  # is blocking actually
+            while __protocol.report(__queue):  # blocking but has timeout
+                pass

Review comment:
       You are right on both counts, the `return True` from `Protocol.report()` also becomes unnecessary, stuck around from first commit. [EDIT] Meaning that the `while` loop should also be removed, if you don't do this now I will do it tomorrow.




----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [skywalking-python] kezhenxu94 merged pull request #98: [Bugfix] allow pending data to send before exit

Posted by GitBox <gi...@apache.org>.
kezhenxu94 merged pull request #98:
URL: https://github.com/apache/skywalking-python/pull/98


   


----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [skywalking-python] tom-pytel commented on a change in pull request #98: [Bugfix] allow pending data to send before exit

Posted by GitBox <gi...@apache.org>.
tom-pytel commented on a change in pull request #98:
URL: https://github.com/apache/skywalking-python/pull/98#discussion_r540645702



##########
File path: skywalking/agent/__init__.py
##########
@@ -38,7 +39,8 @@ def __heartbeat():
 def __report():
     while not __finished.is_set():
         if connected():
-            __protocol.report(__queue)  # is blocking actually
+            while __protocol.report(__queue):  # blocking but has timeout
+                pass

Review comment:
       You are right on both counts, the `return True` from `Protocol.report()` also becomes unnecessary, stuck around from first commit.




----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org