From 76e6b87938c56ba2a728dea6d40a5ada963da874 Mon Sep 17 00:00:00 2001 From: roadscape <roadscape@users.noreply.github.com> Date: Tue, 6 Aug 2019 17:27:54 -0500 Subject: [PATCH] monitor post not available condition #173 --- hive/indexer/cached_post.py | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/hive/indexer/cached_post.py b/hive/indexer/cached_post.py index 9d1c8ba8a..4f0c5176b 100644 --- a/hive/indexer/cached_post.py +++ b/hive/indexer/cached_post.py @@ -332,7 +332,16 @@ class CachedPost: # fields blank. While it's best to not try to cache # already-deleted posts, it can happen during missed # post sweep and while using `trail_blocks` > 0. - pass + + # monitor: post not found which should def. exist; see #173 + sql = """SELECT id, author, permlink, is_deleted + FROM hive_posts WHERE id = :id""" + row = DB.query_row(sql, id=pid) + if level == 'insert' and not row['is_deleted']: + log.warning("couldnt load post for %s: %s", level, row) + else: + log.info("couldnt load post for %s: %s", level, row) + cls._bump_last_id(pid) timer.batch_lap() -- GitLab