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/11/23 20:56:17 UTC
[incubator-ponymail-foal] branch master updated (f86f4b2 -> 975de8e)
This is an automated email from the ASF dual-hosted git repository.
sebb pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-ponymail-foal.git.
from f86f4b2 Update versions
new 9aed0b9 Don't try to recreate the index name
new 975de8e Update version
The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails. The revisions
listed as "add" were already present in the repository and have only
been added to this reference.
Summary of changes:
server/main.py | 2 +-
server/plugins/background.py | 20 ++++++++++----------
2 files changed, 11 insertions(+), 11 deletions(-)
[incubator-ponymail-foal] 02/02: Update version
Posted by se...@apache.org.
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 975de8e0707cb082787dd4b5e568afe6beacab76
Author: Sebb <se...@apache.org>
AuthorDate: Tue Nov 23 20:56:09 2021 +0000
Update version
---
server/main.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/server/main.py b/server/main.py
index 8917158..5480fff 100644
--- a/server/main.py
+++ b/server/main.py
@@ -40,7 +40,7 @@ import plugins.session
PONYMAIL_FOAL_VERSION = "0.1.0"
# The following version is generated by update_version.sh
-PONYMAIL_PLUGIN_VERSION = 'd39d15d' # Must use single quotes
+PONYMAIL_PLUGIN_VERSION = '9aed0b9' # Must use single quotes
# Certain environments such as MinGW-w64 will not register as a TTY and uses buffered output.
[incubator-ponymail-foal] 01/02: Don't try to recreate the index name
Posted by se...@apache.org.
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 9aed0b9adc362652990381261bade3c6924cec9a
Author: Sebb <se...@apache.org>
AuthorDate: Tue Nov 23 20:55:39 2021 +0000
Don't try to recreate the index name
---
server/plugins/background.py | 20 ++++++++++----------
1 file changed, 10 insertions(+), 10 deletions(-)
diff --git a/server/plugins/background.py b/server/plugins/background.py
index de5437f..8ebd351 100644
--- a/server/plugins/background.py
+++ b/server/plugins/background.py
@@ -62,13 +62,13 @@ async def get_lists(database: plugins.configuration.DBConfig) -> dict:
limit = database.max_lists
# Fetch aggregations of all public emails
- s = Search(using=db.client, index=database.db_prefix + "-mbox").filter(
+ s = Search(using=db.client, index=db.dbs.mbox).filter(
"term", private=False
)
s.aggs.bucket("per_list", "terms", field="list_raw", size=limit)
res = await db.search(
- index=database.db_prefix + "-mbox", body=s.to_dict(), size=0
+ index=db.dbs.mbox, body=s.to_dict(), size=0
)
for ml in res["aggregations"]["per_list"]["buckets"]:
@@ -79,13 +79,13 @@ async def get_lists(database: plugins.configuration.DBConfig) -> dict:
}
# Ditto, for private emails
- s = Search(using=db.client, index=database.db_prefix + "-mbox").filter(
+ s = Search(using=db.client, index=db.dbs.mbox).filter(
"term", private=True
)
s.aggs.bucket("per_list", "terms", field="list_raw", size=limit)
res = await db.search(
- index=database.db_prefix + "-mbox", body=s.to_dict(), size=0
+ index=db.dbs.mbox, body=s.to_dict(), size=0
)
for ml in res["aggregations"]["per_list"]["buckets"]:
@@ -96,12 +96,12 @@ async def get_lists(database: plugins.configuration.DBConfig) -> dict:
}
# Get 90 day activity, if any
- s = Search(using=db.client, index=database.db_prefix + "-mbox")
+ s = Search(using=db.client, index=db.dbs.mbox)
s = s.filter('range', date = {'gte': ACTIVITY_TIMESPAN})
s.aggs.bucket("per_list", "terms", field="list_raw", size=limit)
res = await db.search(
- index=database.db_prefix + "-mbox", body=s.to_dict(), size=0
+ index=db.dbs.mbox, body=s.to_dict(), size=0
)
for ml in res["aggregations"]["per_list"]["buckets"]:
@@ -124,7 +124,7 @@ async def get_public_activity(database: plugins.configuration.DBConfig) -> dict:
# Fetch aggregations of all public emails
s = (
- Search(using=db, index=database.db_prefix + "-mbox")
+ Search(using=db, index=db.dbs.mbox)
.query("match", private=False)
.filter("range", date={"lt": "now+1d", "gt": "now-14d"})
)
@@ -136,7 +136,7 @@ async def get_public_activity(database: plugins.configuration.DBConfig) -> dict:
)
res = await db.search(
- index=database.db_prefix + "-mbox", body=s.to_dict(), size=0
+ index=db.dbs.mbox, body=s.to_dict(), size=0
)
no_emails = res["hits"]["total"]["value"]
@@ -152,12 +152,12 @@ async def get_public_activity(database: plugins.configuration.DBConfig) -> dict:
thread_count = 0
s = (
- Search(using=db.client, index=database.db_prefix + "-mbox")
+ Search(using=db.client, index=db.dbs.mbox)
.query("match", private=False)
.filter("range", date={"lt": "now+1d", "gt": "now-14d"})
)
async for doc in db.scan(
- index=database.db_prefix + "-mbox",
+ index=db.dbs.mbox,
query=s.to_dict(),
_source_includes=[
"message-id",