Skip to content
Snippets Groups Projects
Commit 9f66215b authored by Dariusz Kędzierski's avatar Dariusz Kędzierski
Browse files

Feed cache fixes

parent f578a745
No related branches found
No related tags found
5 merge requests!456Release candidate v1 24,!230Setup monitoring with pghero,!135Enable postgres monitoring on CI server,!16Dk issue 3 concurrent block query rebase,!15Dk issue 3 concurrent block query
...@@ -222,7 +222,7 @@ class Posts: ...@@ -222,7 +222,7 @@ class Posts:
author_id = result['author_id'] author_id = result['author_id']
Notify('error', dst_id=author_id, when=date, Notify('error', dst_id=author_id, when=date,
post_id=result['id'], payload=error).write() post_id=result['id'], payload=error).write()
cls._insert_feed_cache(result) cls._insert_feed_cache(result, date)
if op['parent_author']: if op['parent_author']:
#update parent child count #update parent child count
...@@ -287,7 +287,7 @@ class Posts: ...@@ -287,7 +287,7 @@ class Posts:
author_id = Accounts.get_id(post['author']) author_id = Accounts.get_id(post['author'])
Notify('error', dst_id=author_id, when=date, Notify('error', dst_id=author_id, when=date,
post_id=post['id'], payload=post['error']).write() post_id=post['id'], payload=post['error']).write()
cls._insert_feed_cache(post) cls._insert_feed_cache(post, date)
@classmethod @classmethod
def delete(cls, op): def delete(cls, op):
...@@ -404,14 +404,13 @@ class Posts: ...@@ -404,14 +404,13 @@ class Posts:
allow_replies=cpp['allow_replies'], allow_replies=cpp['allow_replies'],
allow_votes=cpp['allow_votes'], allow_votes=cpp['allow_votes'],
allow_curation_rewards=cpp['allow_curation_rewards'], allow_curation_rewards=cpp['allow_curation_rewards'],
author=cpp['author'], permlink=cpp['permlink']) author=comment_pending_payout['author'], permlink=comment_pending_payout['permlink'])
@classmethod @classmethod
def _insert_feed_cache(cls, result): def _insert_feed_cache(cls, result, date):
"""Insert the new post into feed cache if it's not a comment.""" """Insert the new post into feed cache if it's not a comment."""
if not result['depth']: if not result['depth']:
account_id = Accounts.get_id(result['author']) cls._insert_feed_cache4(result['depth'], result['id'], result['author_id'], date)
cls._insert_feed_cache4(result['depth'], result['id'], account_id, result['date'])
@classmethod @classmethod
def _insert_feed_cache4(cls, post_depth, post_id, author_id, post_date): def _insert_feed_cache4(cls, post_depth, post_id, author_id, post_date):
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment