You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ponymail.apache.org by hu...@apache.org on 2020/08/17 11:55:22 UTC

[incubator-ponymail-foal] branch master updated: use elastic lib's default db names as a better source of truth.

This is an automated email from the ASF dual-hosted git repository.

humbedooh pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-ponymail-foal.git


The following commit(s) were added to refs/heads/master by this push:
     new 8542cc1  use elastic lib's default db names as a better source of truth.
8542cc1 is described below

commit 8542cc14a3ab96fc14ab49d5552021c304b0e443
Author: Daniel Gruno <hu...@apache.org>
AuthorDate: Mon Aug 17 13:55:10 2020 +0200

    use elastic lib's default db names as a better source of truth.
---
 tools/archiver.py | 13 ++++++-------
 1 file changed, 6 insertions(+), 7 deletions(-)

diff --git a/tools/archiver.py b/tools/archiver.py
index ca35e9c..b2b433e 100755
--- a/tools/archiver.py
+++ b/tools/archiver.py
@@ -497,20 +497,20 @@ class Archiver(object):  # N.B. Also used by import-mbox.py
             if contents:
                 for key in contents:
                     self.index(
-                        index=self.dbname + "-attachment",
+                        index=self.elastic.db_attachment,
                         id=key,
                         body={"source": contents[key]},
                     )
 
             self.index(
-                index=self.dbname + "-mbox",
+                index=self.elastic.db_mbox
                 id=ojson["mid"],
                 consistency=self.consistency,
                 body=ojson,
             )
 
             self.index(
-                index=self.dbname + "-source",
+                index=self.elastic.db_source,
                 id=sha3,
                 consistency=self.consistency,
                 body={
@@ -558,7 +558,7 @@ class Archiver(object):  # N.B. Also used by import-mbox.py
             and mlist.list_name
         ):
             self.index(
-                index=self.dbname + "-mailinglist",
+                index=self.elastic.db_mailinglist,
                 id=lid,
                 consistency=self.consistency,
                 body={
@@ -585,7 +585,7 @@ class Archiver(object):  # N.B. Also used by import-mbox.py
                         oldrefs.append(cid)
                         # N.B. no index is supplied, so ES will generate one
                         self.index(
-                            index=self.dbname + "-notification",
+                            index=self.elastic.db_notification,
                             consistency=self.consistency,
                             body={
                                 "type": "direct",
@@ -627,9 +627,8 @@ class Archiver(object):  # N.B. Also used by import-mbox.py
                         oldrefs.append(cid)
                         # N.B. no index is supplied, so ES will generate one
                         self.index(
-                            index=self.dbname,
+                            index=self.elastic.db_notification,
                             consistency=self.consistency,
-                            doc_type="notifications",
                             body={
                                 "type": "indirect",
                                 "recipient": cid,