Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
H
hivemind
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
hive
hivemind
Commits
8b6a9ee4
Commit
8b6a9ee4
authored
4 years ago
by
Mariusz Trela
Browse files
Options
Downloads
Patches
Plain Diff
Merge fix
parent
159f745b
No related branches found
No related tags found
4 merge requests
!456
Release candidate v1 24
,
!230
Setup monitoring with pghero
,
!135
Enable postgres monitoring on CI server
,
!61
Issue #47 - test database_api get_payout_stats fail
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
hive/indexer/blocks.py
+1
-0
1 addition, 0 deletions
hive/indexer/blocks.py
hive/indexer/votes.py
+2
-5
2 additions, 5 deletions
hive/indexer/votes.py
with
3 additions
and
5 deletions
hive/indexer/blocks.py
+
1
−
0
View file @
8b6a9ee4
...
@@ -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
}
...
...
This diff is collapsed.
Click to expand it.
hive/indexer/votes.py
+
2
−
5
View file @
8b6a9ee4
...
@@ -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
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment