forked from LBRYCommunity/lbry-sdk
remove last_announce_time
This commit is contained in:
parent
0639bb9865
commit
0494b11001
2 changed files with 0 additions and 16 deletions
|
@ -142,7 +142,6 @@ class DiskBlobManager(DHTHashSupplier):
|
|||
" blob_length integer, " +
|
||||
" last_verified_time real, " +
|
||||
" next_announce_time real, " +
|
||||
" last_announce_time real, " +
|
||||
" should_announce integer)")
|
||||
|
||||
|
||||
|
|
|
@ -15,8 +15,6 @@ def migrate_blobs_db(db_dir):
|
|||
"""
|
||||
We migrate the blobs.db used in BlobManager to have a "should_announce" column,
|
||||
and set this to True for blobs that are sd_hash's or head blobs (first blob in stream)
|
||||
We also add a "last_announce_time" column for when the blob as last announced
|
||||
for debugging purposes
|
||||
"""
|
||||
|
||||
blobs_db = os.path.join(db_dir, "blobs.db")
|
||||
|
@ -43,14 +41,6 @@ def migrate_blobs_db(db_dir):
|
|||
else:
|
||||
log.warn("should_announce already exists somehow, proceeding anyways")
|
||||
|
||||
try:
|
||||
blobs_db_cursor.execute("SELECT last_announce_time FROM blobs")
|
||||
except sqlite3.OperationalError:
|
||||
blobs_db_cursor.execute("ALTER TABLE blobs ADD COLUMN last_announce_time")
|
||||
else:
|
||||
log.warn("last_announce_time already exist somehow, proceeding anyways")
|
||||
|
||||
|
||||
# if lbryfile_info.db doesn't exist, skip marking blobs as should_announce = True
|
||||
if not os.path.isfile(lbryfile_info_db):
|
||||
log.error("lbryfile_info.db was not found, skipping check for should_announce")
|
||||
|
@ -85,11 +75,6 @@ def migrate_blobs_db(db_dir):
|
|||
except sqlite3.OperationalError:
|
||||
raise Exception('Migration failed, cannot find should_announce')
|
||||
|
||||
try:
|
||||
blobs_db_cursor.execute("SELECT last_announce_time FROM blobs")
|
||||
except sqlite3.OperationalError:
|
||||
raise Exception('Migration failed, cannot find last_announce_time')
|
||||
|
||||
blobs_db_cursor.execute("SELECT * FROM blobs WHERE should_announce=1")
|
||||
blobs = blobs_db_cursor.fetchall()
|
||||
if len(blobs) != len(should_announce_blob_hashes):
|
||||
|
|
Loading…
Reference in a new issue