kopia lustrzana https://github.com/snarfed/bridgy-fed
nodeinfo: stop counting posts and comments dynamically
queries have gotten too heavy, sadlypull/775/head
rodzic
95e699f5b5
commit
1ce19c2928
13
pages.py
13
pages.py
|
@ -357,12 +357,13 @@ def nodeinfo():
|
||||||
# 'activeMonth':
|
# 'activeMonth':
|
||||||
# 'activeHalfyear':
|
# 'activeHalfyear':
|
||||||
},
|
},
|
||||||
'localPosts': Object.query(Object.source_protocol.IN(('web', 'webmention')),
|
# these are too heavy
|
||||||
Object.type.IN(['note', 'article']),
|
# 'localPosts': Object.query(Object.source_protocol.IN(('web', 'webmention')),
|
||||||
).count(),
|
# Object.type.IN(['note', 'article']),
|
||||||
'localComments': Object.query(Object.source_protocol.IN(('web', 'webmention')),
|
# ).count(),
|
||||||
Object.type == 'comment',
|
# 'localComments': Object.query(Object.source_protocol.IN(('web', 'webmention')),
|
||||||
).count(),
|
# Object.type == 'comment',
|
||||||
|
# ).count(),
|
||||||
},
|
},
|
||||||
'openRegistrations': True,
|
'openRegistrations': True,
|
||||||
'metadata': {},
|
'metadata': {},
|
||||||
|
|
Ładowanie…
Reference in New Issue