def send_recv_recommender(self, bus_url, params, option): """ Routine to interact with Recommendation service via ActiveMQ bus option == 'devs' : recommend developers to solve an issue option == 'issues' : recommend issues to a developer """ if option == 'devs': header = self.header_devs_recomm topic_req = self.topic_req_devs_recomm topic_res = self.topic_res_devs_recomm elif option == 'issues': header = self.header_issues_recomm topic_req = self.topic_res_issues_recomm topic_res = self.topic_req_issues_recomm get_info_msg = self.serial_recommendation(header, params, False, True, topic_req) #Uncomment to trace #print get_info_msg bquery = BusQuery(bus_url, topic_req, get_info_msg, topic_res) result = bquery.run() return result
def send_recv_metadata(self, bus_url, params): """ Routine to interact with Metadata service via ActiveMQ bus """ get_info_msg = self.serial_metadata(None, params, False, True, self.topic_req_metadata) #Uncomment to trace #print get_info_msg bquery = BusQuery(bus_url, self.topic_req_metadata, get_info_msg, self.topic_res_metadata) result = bquery.run() return result
def send_recv_keui(self, bus_url, params): """ Routine to interact with KEUI via ActiveMQ """ get_info_msg = self.serial_keui(None, params, False, True, self.topic_req_keui) #Uncomment to trace #print get_info_msg bquery = BusQuery(bus_url, self.topic_req_keui, get_info_msg, self.topic_res_keui) result = bquery.run() return result
# method.getAllForIdentity #tx_message = event_composer.serial_metadata(None, #EventComposer.params_method_get_all_for_identity, #False, True, EventComposer.topic_req_metadata) #print tx_message #test_metadata = BusQuery(url, EventComposer.topic_req_metadata, tx_message, #EventComposer.topic_res_metadata) #answer = send_receive(test_metadata) # commit.getInfo tx_message = event_composer.serial_metadata(None, EventComposer.params_commit_get_info, False, True, EventComposer.topic_req_metadata) print tx_message test_metadata = BusQuery(url, EventComposer.topic_req_metadata, tx_message, EventComposer.topic_res_metadata) answer = send_receive(test_metadata) ## KEUI ## Get similar threads #tx_message = event_composer.serial_keui(None, #EventComposer.params_issues_for_keywords, #False, True, EventComposer.topic_req_keui) #print tx_message #test_keui = BusQuery(url, EventComposer.topic_req_keui, tx_message, #EventComposer.topic_res_keui) #send_receive(test_keui) ## Get issues for keywords #tx_message = event_composer.serial_keui(None,