コード例 #1
0
ファイル: server.py プロジェクト: zz198808/milvus
 def decorate_handler(self, handler):
     for key, attr in handler.__dict__.items():
         if is_grpc_method(attr):
             setattr(handler, key, self.wrap_method_with_errorhandler(attr))
     return handler
コード例 #2
0
ファイル: test_grpc.py プロジェクト: XuPeng-SH/mishards
 def test_is_grpc_method(self):
     target = 1
     assert not is_grpc_method(target)
     target = None
     assert not is_grpc_method(target)