Skip to content

Commit 9bd3985

Browse files
committed
minor logging tune
1 parent c887328 commit 9bd3985

3 files changed

Lines changed: 5 additions & 4 deletions

File tree

hive/indexer/cached_post.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -378,14 +378,15 @@ def _sql(cls, pid, post, level=None):
378378
- `update`: post was modified
379379
- `payout`: post was paidout
380380
- `upvote`: post payout/votes changed
381+
- `recount`: post has new child
381382
"""
382383

383384
#pylint: disable=bad-whitespace
384385
assert post['author'], "post {} is blank".format(pid)
385386

386387
# last-minute sanity check to ensure `pid` is correct #78
387388
pid2 = cls._get_id(post['author']+'/'+post['permlink'])
388-
assert pid == pid2, "hpc id %d maps to %d" % (pid, pid2)
389+
assert pid == pid2, "hpc id %d maps to %d %s" % (pid, pid2, repr(post))
389390

390391
# inserts always sequential. if pid > last_id, this operation
391392
# *must* be an insert; so `level` must not be any form of update.

hive/server/condenser_api/objects.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ async def load_posts(db, ids, truncate_body=0):
5757
# in rare cases of cache inconsistency, recover and warn
5858
missed = set(ids) - posts_by_id.keys()
5959
if missed:
60-
log.warning("get_posts do not exist in cache: %s", repr(missed))
60+
log.info("get_posts do not exist in cache: %s", repr(missed))
6161
for _id in missed:
6262
ids.remove(_id)
6363
sql = ("SELECT id, author, permlink, depth, created_at, is_deleted "
@@ -70,7 +70,7 @@ async def load_posts(db, ids, truncate_body=0):
7070
VALUES (:id, :author, :permlink)"""
7171
await db.query(sql, **post)
7272
else:
73-
log.warning("requested deleted post: %s", dict(post))
73+
log.info("requested deleted post: %s", dict(post))
7474

7575
return [posts_by_id[_id] for _id in ids]
7676

hive/steem/block/schedule.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ def _check_missing(self, num, prev_date, next_date):
8787
missed = (gap_secs / self.BLOCK_INTERVAL) - 1
8888
if missed:
8989
self._add_missed(missed)
90-
log.warning("%d missed @ block %d", missed, num)
90+
log.info("%d missed @ block %d", missed, num)
9191

9292
def _drift_backward(self, delta=0.1):
9393
"""Delay the schedule by 0.1s when a block fetch failed."""

0 commit comments

Comments
 (0)