diff --git a/modules/bibrank/lib/bibrank_tag_based_indexer.py b/modules/bibrank/lib/bibrank_tag_based_indexer.py index 95a9c186c..57f69b9b8 100644 --- a/modules/bibrank/lib/bibrank_tag_based_indexer.py +++ b/modules/bibrank/lib/bibrank_tag_based_indexer.py @@ -232,18 +232,6 @@ def intoDB(dict, date, rank_method_code): if date: run_sql("UPDATE rnkMETHOD SET last_updated=%s WHERE name=%s", (date, rank_method_code)) - # FIXME: the following is a workaround for the citation indexer - # memory troubles, when Apache WSGI daemon processes may end up - # doubling the memory after citation dictionary is updated; - # therefore let us restart the WSGI daemon application after the - # citation indexer finished, which relieves this problem. The - # restart is done via touching invenio.wsgi file. The proper fix - # for this problem would be strict separation between citation - # indexer updating dicts and citation searcher loading dicts. - if rank_method_code == 'citation': - os.system('touch ' + os.path.join(CFG_PREFIX, 'var', 'www-wsgi', - 'invenio.wsgi')) - def fromDB(rank_method_code): """Get the data for a rank method""" id = run_sql("SELECT id from rnkMETHOD where name=%s", (rank_method_code, )) diff --git a/modules/miscutil/lib/data_cacher.py b/modules/miscutil/lib/data_cacher.py index 7203ce85d..fca278b44 100644 --- a/modules/miscutil/lib/data_cacher.py +++ b/modules/miscutil/lib/data_cacher.py @@ -65,6 +65,10 @@ def create_cache(self): Create and populate cache by calling cache filler. Called on startup and used later during runtime as needed by clients. """ + # We empty the cache first to force freeing of the variable + # this is useful when it is really big like our citations dictionary + self.cache = None + self.cache = self.cache_filler() self.timestamp = time.strftime("%Y-%m-%d %H:%M:%S", time.localtime())