コード例 #1
0
ファイル: builder.py プロジェクト: vthorsteinsson/Reynir
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))
コード例 #2
0
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))
コード例 #3
0
ファイル: search.py プロジェクト: thorunna/Greynir
 def _connect(cls):
     """ Ensure that the client is connected, if possible """
     if cls.similarity_client is None:
         cls.similarity_client = SimilarityClient()