-
Notifications
You must be signed in to change notification settings - Fork 32
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 connection_string to interface and use in interface_microservice #1184
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #1184 +/- ##
==========================================
- Coverage 74.97% 74.92% -0.06%
==========================================
Files 595 599 +4
Lines 43929 44200 +271
Branches 759 759
==========================================
+ Hits 32936 33115 +179
- Misses 10910 11001 +91
- Partials 83 84 +1
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
@@ -31,6 +31,10 @@ def initialize(port = 80) | |||
@request_queue = Queue.new | |||
end | |||
|
|||
def connection_string | |||
return "listening on #{@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.
Needs hostname too.
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.
Hostname isn't part of the connection parameters. It's just: @server = WEBrick::HTTPServer.new :Port => @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.
It should be though. Should work the same as tcpip_server_interface.
@@ -627,7 +627,7 @@ def handle_connection_lost(err = nil, reconnect: true) | |||
end | |||
|
|||
def connect | |||
@logger.info "#{@interface.name}: Connecting ..." | |||
@logger.info "#{@interface.name}: Connection #{@interface.connection_string}" |
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.
Connection doesn't read as nice as connecting... Maybe just Connecting: ?
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.
How about Connect
@@ -119,6 +118,16 @@ def initialize(write_port, | |||
@connected = false | |||
end | |||
|
|||
def connection_string | |||
if @write_port == @read_port | |||
return "listening on #{@write_port} (R/W)" |
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.
Should include hostname
Quality Gate failedFailed conditions |
Still need to do Python but this is what I'm thinking
closes #1169