Only create file during install
This commit is contained in:
parent
ef36e0311e
commit
9791bb800e
1 changed files with 3 additions and 4 deletions
|
@ -27,6 +27,9 @@ TRENDING_LOG = True
|
||||||
# Stubs
|
# Stubs
|
||||||
def install(connection):
|
def install(connection):
|
||||||
check_trending_values(connection)
|
check_trending_values(connection)
|
||||||
|
f = open("trending_ar.log", "w")
|
||||||
|
f.close()
|
||||||
|
|
||||||
|
|
||||||
CREATE_TREND_TABLE = ""
|
CREATE_TREND_TABLE = ""
|
||||||
|
|
||||||
|
@ -53,8 +56,6 @@ def check_trending_values(connection):
|
||||||
COMMIT;""")
|
COMMIT;""")
|
||||||
print("done.")
|
print("done.")
|
||||||
|
|
||||||
# Create the index
|
|
||||||
c.execute("create index if not exists claim_id_only_idx on claim (claim_id);")
|
|
||||||
|
|
||||||
|
|
||||||
def spike_height(trending_score, x, x_old, time_boost=1.0):
|
def spike_height(trending_score, x, x_old, time_boost=1.0):
|
||||||
|
@ -170,8 +171,6 @@ def test_trending():
|
||||||
# One global instance
|
# One global instance
|
||||||
# pylint: disable=C0103
|
# pylint: disable=C0103
|
||||||
trending_data = TrendingData()
|
trending_data = TrendingData()
|
||||||
f = open("trending_ar.log", "w")
|
|
||||||
f.close()
|
|
||||||
|
|
||||||
def run(db, height, final_height, recalculate_claim_hashes):
|
def run(db, height, final_height, recalculate_claim_hashes):
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue