Skip to content

Commit

Permalink
Pass connection request to helper
Browse files Browse the repository at this point in the history
  • Loading branch information
sajith committed Jan 10, 2024
1 parent 7aaea7c commit aa86fa8
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions swagger_server/handlers/connection_handler.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ def remove_connection(self, connection):
# call pce to remove connection
pass

def _send_breakdown_to_lc(self, breakdown):
def _send_breakdown_to_lc(self, breakdown, connection_request):
logger.debug(f"-- BREAKDOWN: {json.dumps(breakdown)}")

if breakdown is None:
Expand Down Expand Up @@ -53,8 +53,8 @@ def _send_breakdown_to_lc(self, breakdown):
if simple_link not in link_connections_dict:
link_connections_dict[simple_link] = []

if connection not in link_connections_dict[simple_link]:
link_connections_dict[simple_link].append(connection)
if connection_request not in link_connections_dict[simple_link]:
link_connections_dict[simple_link].append(connection_request)

self.db_instance.add_key_value_pair_to_db(
"link_connections_dict", json.dumps(link_connections_dict)
Expand Down Expand Up @@ -158,7 +158,7 @@ def place_connection(self, connection_request: dict) -> Tuple[str, int]:
return "Could not solve the request", 400

breakdown = temanager.generate_connection_breakdown(solution)
self._send_breakdown_to_lc(breakdown)
self._send_breakdown_to_lc(breakdown, connection_request)

def handle_link_failure(self, msg_json):
logger.debug("---Handling connections that contain failed link.---")
Expand Down

0 comments on commit aa86fa8

Please sign in to comment.