Skip to content
Snippets Groups Projects
Commit 8b6a9ee4 authored by Mariusz Trela's avatar Mariusz Trela
Browse files

Merge fix

parent 159f745b
No related branches found
No related tags found
4 merge requests!456Release candidate v1 24,!230Setup monitoring with pghero,!135Enable postgres monitoring on CI server,!61Issue #47 - test database_api get_payout_stats fail
...@@ -134,6 +134,7 @@ class Blocks: ...@@ -134,6 +134,7 @@ class Blocks:
elif op_type == 'effective_comment_vote_operation': elif op_type == 'effective_comment_vote_operation':
ops_stats[ 'effective_comment_vote_operation' ] += 1 ops_stats[ 'effective_comment_vote_operation' ] += 1
key_vote = "{}/{}/{}".format(op_value['voter'], op_value['author'], op_value['permlink']) key_vote = "{}/{}/{}".format(op_value['voter'], op_value['author'], op_value['permlink'])
vote_ops[ key_vote ] = op_value
if key not in comment_payout_ops: if key not in comment_payout_ops:
comment_payout_ops[key] = { 'author_reward_operation':None, 'comment_reward_operation':None, 'effective_comment_vote_operation':None, 'comment_payout_update_operation':None, 'date' : date } comment_payout_ops[key] = { 'author_reward_operation':None, 'comment_reward_operation':None, 'effective_comment_vote_operation':None, 'comment_payout_update_operation':None, 'date' : date }
......
...@@ -70,11 +70,8 @@ class Votes: ...@@ -70,11 +70,8 @@ class Votes:
last_update="1969-12-31T23:59:59") last_update="1969-12-31T23:59:59")
@classmethod @classmethod
def effective_comment_vote_op(cls, vop, date): def effective_comment_vote_op(cls, key, vop, date):
""" Process effective_comment_vote_operation """ """ Process effective_comment_vote_operation """
voter = vop['voter']
author = vop['author']
permlink = vop['permlink']
if(cls.inside_flush): if(cls.inside_flush):
log.info("Updating data in '_votes_data' using effective comment") log.info("Updating data in '_votes_data' using effective comment")
...@@ -108,7 +105,7 @@ class Votes: ...@@ -108,7 +105,7 @@ class Votes:
INNER JOIN hive_accounts ha_v ON ha_v.name = t.voter INNER JOIN hive_accounts ha_v ON ha_v.name = t.voter
INNER JOIN hive_accounts ha_a ON ha_a.name = t.author INNER JOIN hive_accounts ha_a ON ha_a.name = t.author
INNER JOIN hive_permlink_data hpd_p ON hpd_p.permlink = t.permlink INNER JOIN hive_permlink_data hpd_p ON hpd_p.permlink = t.permlink
INNER JOIN hive_posts hp ON hp.author_id = ha_a.id AND hp.permlink_id = hpd_p.id INNER JOIN hive_posts hp ON hp.author_id = ha_a.id AND hp.permlink_id = hpd_p.id
) as data_source(post_id, voter_id, author_id, permlink_id, weight, rshares, vote_percent, last_update) ) as data_source(post_id, voter_id, author_id, permlink_id, weight, rshares, vote_percent, last_update)
ON CONFLICT ON CONSTRAINT hive_votes_ux1 DO ON CONFLICT ON CONSTRAINT hive_votes_ux1 DO
UPDATE UPDATE
......
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