Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add direct channel feature #996

Merged
merged 1 commit into from
Mar 24, 2022
Merged

add direct channel feature #996

merged 1 commit into from
Mar 24, 2022

Conversation

akaszynski
Copy link
Collaborator

Resolve #987 by allowing for instantiating MapdlGrpc directly from a gRPC channel.

Behind the scenes, it's still running a multi-connect and reuses much of the existing "hardware".

If you wish to customize the channel, you can also directly connect
directly to gRPC channels. For example, if you wanted to create an insecure
channel with a maximum message length of 8 MB.

>>> import grpc
>>> channel = grpc.insecure_channel(
...     '127.0.0.1:50052',
...     options=[
...         ("grpc.max_receive_message_length", 8*1024**2),
...     ],
... )
>>> mapdl = pymapdl.Mapdl(channel=channel)

@akaszynski akaszynski requested a review from plule-ansys March 24, 2022 12:06
@codecov
Copy link

codecov bot commented Mar 24, 2022

Codecov Report

Merging #996 (c45e2e2) into main (bd80c49) will increase coverage by 1.50%.
The diff coverage is 97.91%.

@@            Coverage Diff             @@
##             main     #996      +/-   ##
==========================================
+ Coverage   73.28%   74.78%   +1.50%     
==========================================
  Files          39       43       +4     
  Lines        5750     6037     +287     
==========================================
+ Hits         4214     4515     +301     
+ Misses       1536     1522      -14     

Copy link
Contributor

@plule-ansys plule-ansys left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks good, thank you Alex

@akaszynski akaszynski merged commit 0fb2494 into main Mar 24, 2022
@akaszynski akaszynski deleted the feat/direct_channel branch March 24, 2022 13:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Allow constructing MapdlGrpc from a GRPC channel
2 participants