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/30 04:55:27 UTC

[GitHub] [skywalking-python] kezhenxu94 commented on a change in pull request #113: FIX plugin sw_pymysql error when connection haven't db

kezhenxu94 commented on a change in pull request #113:
URL: https://github.com/apache/skywalking-python/pull/113#discussion_r549935072



##########
File path: skywalking/agent/__init__.py
##########
@@ -73,6 +73,15 @@ def __fini():
 
 
 def start():
+    flag = False
+    try:
+        from gevent import monkey
+        flag = monkey.is_module_patched("socket")
+    except Exception as e:
+        logger.warning("check gevent error:%s", e)
+    if flag:
+        import grpc.experimental.gevent as grpc_gevent
+        grpc_gevent.init_gevent()

Review comment:
       Can you please explain why we add these lines in the agent? I remember these in the other thread but I suppose these should be in the targeted application, because the agent has nothing to do with `monkey` at all?




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