Merge pull request #3134 from lbryio/log_checkpoint

log checkpoint finishing so we can gather information on leftover files bug
This commit is contained in:
Jack Robison 2021-01-01 15:24:30 -05:00 committed by GitHub
commit 1a996b6ef3
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -124,6 +124,7 @@ class AIOSQLite:
def __checkpoint_and_close(conn: sqlite3.Connection):
conn.execute("PRAGMA WAL_CHECKPOINT(FULL);")
log.info("DB checkpoint finished.")
conn.close()
await asyncio.get_event_loop().run_in_executor(
self.writer_executor, __checkpoint_and_close, self.writer_connection)