kopia lustrzana https://github.com/bugout-dev/moonstream
Made filters inclusive of start and end times
This was a bug that I introduced in my review of @Andrei-Dolgolev's changes.pull/286/head
rodzic
4b41b4cb38
commit
a2ea96b35e
|
@ -445,20 +445,20 @@ def filter_data(
|
|||
"""
|
||||
|
||||
cur = sqlite_db.cursor()
|
||||
print(f"Remove by timestamp <= {start_time}")
|
||||
print(f"Remove by timestamp < {start_time}")
|
||||
if start_time:
|
||||
cur.execute(f"DELETE from transfers where timestamp <= {start_time}")
|
||||
cur.execute(f"DELETE from transfers where timestamp < {start_time}")
|
||||
print(f"Transfers filtered out: {cur.rowcount}")
|
||||
sqlite_db.commit()
|
||||
cur.execute(f"DELETE from mints where timestamp <= {start_time}")
|
||||
cur.execute(f"DELETE from mints where timestamp < {start_time}")
|
||||
print(f"Mints filtered out: {cur.rowcount}")
|
||||
sqlite_db.commit()
|
||||
|
||||
print(f"Remove by timestamp >= {end_time}")
|
||||
print(f"Remove by timestamp > {end_time}")
|
||||
if end_time:
|
||||
cur.execute(f"DELETE from transfers where timestamp >= {end_time}")
|
||||
cur.execute(f"DELETE from transfers where timestamp > {end_time}")
|
||||
print(f"Transfers filtered out: {cur.rowcount}")
|
||||
sqlite_db.commit()
|
||||
cur.execute(f"DELETE from mints where timestamp >= {end_time}")
|
||||
cur.execute(f"DELETE from mints where timestamp > {end_time}")
|
||||
print(f"Mints filtered out: {cur.rowcount}")
|
||||
sqlite_db.commit()
|
||||
|
|
Ładowanie…
Reference in New Issue