def notify_similarity_server(): """ Notify the similarity server - if running - that article tags have been updated """ try: client = SimilarityClient() client.refresh_topics() client.close() except Exception as e: print("Exception in notify_similarity_server(): {0}".format(e))
def _connect(cls): """ Ensure that the client is connected, if possible """ if cls.similarity_client is None: cls.similarity_client = SimilarityClient()