Skip to content
Snippets Groups Projects
Commit 7e1ed799 authored by Gandalf's avatar Gandalf
Browse files

[JES] Add a limit on the get_discussion call to only return at most 2000...

[JES] Add a limit on the get_discussion call to only return at most 2000 posts/comments. There are some posts with thousands of children, and requesting those posts tends to cause the hivemind server to hang while executing a large query. This should prevent that
parent e31f1e5e
No related branches found
No related tags found
3 merge requests!456Release candidate v1 24,!230Setup monitoring with pghero,!135Enable postgres monitoring on CI server
......@@ -45,6 +45,7 @@ async def get_discussion(context, author, permlink, observer=None):
INNER JOIN hive_post_data hpd ON hpd.id = hive_posts.id
INNER JOIN hive_category_data hcd ON hcd.id = hp.category_id
WHERE NOT hive_posts.is_deleted AND NOT hive_posts.is_muted
LIMIT 2000
"""
blacklists_for_user = None
......
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