-
Notifications
You must be signed in to change notification settings - Fork 162
made more robust the launch_ironpython_server. now it is checking the aedt_path #983
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
Conversation
… aedt_path and it is checking if connection to the client is successful before initializing it.
Codecov Report
@@ Coverage Diff @@
## main #983 +/- ##
===========================================
- Coverage 80.74% 66.16% -14.59%
===========================================
Files 129 198 +69
Lines 38350 46867 +8517
===========================================
+ Hits 30965 31008 +43
- Misses 7385 15859 +8474 |
@@ -244,6 +245,9 @@ def client(server_name, server_port=18000, beta_options=None): | |||
except: | |||
t -= 1 | |||
time.sleep(1) | |||
if not c: | |||
print("Failing to connect to {} on port {}. Check the settings".format(server_name, server_port)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These should raise errors.
@@ -244,6 +245,9 @@ def client(server_name, server_port=18000, beta_options=None): | |||
except: | |||
t -= 1 | |||
time.sleep(1) | |||
if not c: | |||
print("Failing to connect to {} on port {}. Check the settings".format(server_name, server_port)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These should raise errors.
print("Process {} started on {}".format(proc.pid, socket.getfqdn())) | ||
print("Using port {}".format(port1)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should be logged.
print("Process {} started on {}".format(proc.pid, socket.getfqdn())) | ||
print("Using port {}".format(port1)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should be logged.
@maxcapodi78 If we decide to go with the log option instead of the print. We cannot use the AEDT message logger because it won't be available.
|
@akaszynski That's is the only part of pyaedt not logget because it is the linux client_server. this cannot be logged because nothing is started yet. the logs starts after the client is up and running |
from rpyc.utils.server import ThreadedServer | ||
from pyaedt.rpc.rpyc_services import GlobalService, check_port | ||
import rpyc.core.consts | ||
# sys.path.insert(0, os.path.join(pyaedt_path, "third_party", "ironpython")) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
# sys.path.insert(0, os.path.join(pyaedt_path, "third_party", "ironpython")) |
@@ -3,10 +3,15 @@ | |||
|
|||
os.environ["PYAEDT_IRONPYTHON_SERVER"] = "1" | |||
sys.path.append(pyaedt_path) | |||
sys.path.insert(0, os.path.join(pyaedt_path, "pyaedt", "third_party", "ironpython")) | |||
#sys.path.insert(0, os.path.join(pyaedt_path, "pyaedt", "third_party", "ironpython")) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
#sys.path.insert(0, os.path.join(pyaedt_path, "pyaedt", "third_party", "ironpython")) |
@MaxJPRey If it is ok for you we can take in another PR. We need to test the log and see if no issues are in both Windows and Linux, CPython and IPY |
… and it is checking if connection to the client is successful before initializing it.