fix integration test

-cancel running reflector uploads from publishes upon shutdown
-refactor blob.delete to be non-async
-delete blobs synchronously
This commit is contained in:
Jack Robison 2019-02-14 15:42:12 -05:00
parent 9c8593d88e
commit 56c41b2fea
No known key found for this signature in database
GPG key ID: DF25C68FE0239BB2
4 changed files with 25 additions and 27 deletions
lbrynet/blob

View file

@ -144,14 +144,13 @@ class BlobFile:
while self.writers:
self.writers.pop().finished.cancel()
async def delete(self):
def delete(self):
self.close()
async with self.blob_write_lock:
self.saved_verified_blob = False
if os.path.isfile(self.file_path):
os.remove(self.file_path)
self.verified.clear()
self.finished_writing.clear()
self.saved_verified_blob = False
if os.path.isfile(self.file_path):
os.remove(self.file_path)
self.verified.clear()
self.finished_writing.clear()
def decrypt(self, key: bytes, iv: bytes) -> bytes:
"""