00be4ae634832d8c39a2468c66349df964585a2c,grid/websocket_client.py,WebsocketGridClient,get_node_id,#WebsocketGridClient#,89

Before Change


        return (secure, url.hostname, url.port)

    def get_node_id(self):
        message = {"type": "get-id"}
        self.ws.send(json.dumps(message))
        response = json.loads(self.ws.recv())
        return response["id"]

After Change


        
        message = {REQUEST_MSG.TYPE_FIELD: REQUEST_MSG.GET_ID}
        response = self._forward_json_to_websocket_server_worker(message)
        return response.get(RESPONSE_MSG.NODE_ID, None)

    def connect_nodes(self, node) -> dict:
         Connect two remote workers between each other.
            If this node is authenticated, use the same credentials to authenticate the candidate node.
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 3

Instances


Project Name: OpenMined/Grid
Commit Name: 00be4ae634832d8c39a2468c66349df964585a2c
Time: 2019-10-21
Author: ionesiojr@gmail.com
File Name: grid/websocket_client.py
Class Name: WebsocketGridClient
Method Name: get_node_id


Project Name: descarteslabs/descarteslabs-python
Commit Name: 2a2b31cd28786848bf3a75b0da0453590094bf49
Time: 2017-07-18
Author: justin.poehnelt@gmail.com
File Name: descarteslabs/tests/test_auth.py
Class Name: TestAuth
Method Name: test_get_token


Project Name: merenlab/anvio
Commit Name: f56c390e33d9ccb52932ee2b0b07a8d6121eec9e
Time: 2019-03-29
Author: ozcanesen@gmail.com
File Name: anvio/bottleroutes.py
Class Name: BottleApplication
Method Name: search_items_by_name