diff --git a/lbry/wallet/server/db/trending/__init__.py b/lbry/wallet/server/db/trending/__init__.py index c9d9b616d..cfa8ab38b 100644 --- a/lbry/wallet/server/db/trending/__init__.py +++ b/lbry/wallet/server/db/trending/__init__.py @@ -1,6 +1,8 @@ from . import zscore +from . import ar TRENDING_ALGORITHMS = { 'zscore': zscore, + 'ar': ar } diff --git a/lbry/wallet/server/db/trending_ar.py b/lbry/wallet/server/db/trending/ar.py similarity index 98% rename from lbry/wallet/server/db/trending_ar.py rename to lbry/wallet/server/db/trending/ar.py index ae89e3953..3aaa6cdb5 100644 --- a/lbry/wallet/server/db/trending_ar.py +++ b/lbry/wallet/server/db/trending/ar.py @@ -25,7 +25,7 @@ TRENDING_LOG = True # Stubs -def register_trending_functions(connection): +def install(connection): check_trending_values(connection) CREATE_TREND_TABLE = "" @@ -173,7 +173,7 @@ trending_data = TrendingData() f = open("trending_ar.log", "w") f.close() -def calculate_trending(db, height, final_height, recalculate_claim_hashes): +def run(db, height, final_height, recalculate_claim_hashes): if height < final_height - 5*HALF_LIFE: trending_log("Skipping AR trending at block {h}.\n".format(h=height))