diff --git a/build_database.py b/build_database.py index 8eb933f..c500c35 100644 --- a/build_database.py +++ b/build_database.py @@ -192,6 +192,7 @@ async def main_with_ctx(ctx, wanted_date): processed_ratio = new_processed_ratio log.info("tags done") + work_done = True await ctx.db.commit() @@ -285,11 +286,13 @@ async def main_with_ctx(ctx, wanted_date): processed_ratio = new_processed_ratio log.info("posts done") + work_done = True await ctx.db.commit() - log.info("vacuuming db...") - await ctx.db.execute("vacuum") + if work_done: + log.info("vacuuming db...") + await ctx.db.execute("vacuum") log.info("database built")