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
aa6bda69
Commit
aa6bda69
authored
4 years ago
by
Bartek Wrona
Browse files
Options
Downloads
Patches
Plain Diff
Fixed SQL function attribute
parent
ca465e5c
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
,
!45
Fixed query counting children for posts collected during sync.
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
hive/db/db_state.py
+7
-0
7 additions, 0 deletions
hive/db/db_state.py
hive/db/schema.py
+1
-3
1 addition, 3 deletions
hive/db/schema.py
with
8 additions
and
3 deletions
hive/db/db_state.py
+
7
−
0
View file @
aa6bda69
...
...
@@ -3,6 +3,8 @@
#pylint: disable=too-many-lines
import
time
from
time
import
perf_counter
import
logging
import
sqlalchemy
...
...
@@ -174,12 +176,17 @@ class DbState:
index
.
create
(
engine
)
time_start
=
perf_counter
()
# Update count of all child posts (what was hold during initial sync)
sql
=
"""
select update_hive_posts_children_count()
"""
row
=
DbState
.
db
().
query_row
(
sql
)
time_end
=
perf_counter
()
log
.
info
(
"
[INIT] update_hive_posts_children_count executed in %fs
"
,
time_end
-
time_start
)
# TODO: #111
#for key in cls._all_foreign_keys():
# log.info("Create fk %s", key.name)
...
...
This diff is collapsed.
Click to expand it.
hive/db/schema.py
+
1
−
3
View file @
aa6bda69
...
...
@@ -658,9 +658,7 @@ def setup(db):
CREATE OR REPLACE FUNCTION public.update_hive_posts_children_count()
RETURNS void
LANGUAGE
'
plpgsql
'
COST 100
STABLE
VOLATILE
AS $BODY$
BEGIN
...
...
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