You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ponymail.apache.org by se...@apache.org on 2021/12/14 17:19:33 UTC
[incubator-ponymail-foal] 01/02: Use config item, not magic number
This is an automated email from the ASF dual-hosted git repository.
sebb pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-ponymail-foal.git
commit 988f7557944b33f1c60cea727e09ecd7b2543f0f
Author: Sebb <se...@apache.org>
AuthorDate: Tue Dec 14 17:19:04 2021 +0000
Use config item, not magic number
---
server/plugins/messages.py | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/server/plugins/messages.py b/server/plugins/messages.py
index 07c5358..05a4f0a 100644
--- a/server/plugins/messages.py
+++ b/server/plugins/messages.py
@@ -470,12 +470,13 @@ async def get_activity_span(session: plugins.session.SessionObject, query_defuzz
fuzz_private_only = dict(query_defuzzed)
fuzz_private_only["filter"] = [{"term": {"private": True}}]
assert session.database, DATABASE_NOT_CONNECTED
+ max_lists = session.database.config.max_lists
res = await session.database.search(
index=session.database.dbs.db_mbox,
size=0,
body={
"query": {"bool": fuzz_private_only},
- "aggs": {"listnames": {"terms": {"field": "list_raw", "size": 10000}}},
+ "aggs": {"listnames": {"terms": {"field": "list_raw", "size": max_lists}}},
},
)
private_lists_found = []