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':
|
||||
# 'activeHalfyear':
|
||||
},
|
||||
'localPosts': Object.query(Object.source_protocol.IN(('web', 'webmention')),
|
||||
Object.type.IN(['note', 'article']),
|
||||
).count(),
|
||||
'localComments': Object.query(Object.source_protocol.IN(('web', 'webmention')),
|
||||
Object.type == 'comment',
|
||||
).count(),
|
||||
# these are too heavy
|
||||
# 'localPosts': Object.query(Object.source_protocol.IN(('web', 'webmention')),
|
||||
# Object.type.IN(['note', 'article']),
|
||||
# ).count(),
|
||||
# 'localComments': Object.query(Object.source_protocol.IN(('web', 'webmention')),
|
||||
# Object.type == 'comment',
|
||||
# ).count(),
|
||||
},
|
||||
'openRegistrations': True,
|
||||
'metadata': {},
|
||||
|
|
Ładowanie…
Reference in New Issue