ponymail-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From humbed...@apache.org
Subject [2/4] incubator-ponymail git commit: Support ES 6.x py lib
Date Wed, 03 Jan 2018 00:34:34 GMT
Support ES 6.x py lib

This fixes #424. Tried and tested.


Project: http://git-wip-us.apache.org/repos/asf/incubator-ponymail/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ponymail/commit/38c614b1
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ponymail/tree/38c614b1
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ponymail/diff/38c614b1

Branch: refs/heads/master
Commit: 38c614b1a95d7b5abaf91ef5ce45697ccc0a72c2
Parents: 81bb1e6
Author: Daniel Gruno <humbedooh@apache.org>
Authored: Wed Jan 3 01:14:27 2018 +0100
Committer: Daniel Gruno <humbedooh@apache.org>
Committed: Wed Jan 3 01:14:27 2018 +0100

----------------------------------------------------------------------
 tools/archiver.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ponymail/blob/38c614b1/tools/archiver.py
----------------------------------------------------------------------
diff --git a/tools/archiver.py b/tools/archiver.py
index 88905e2..14b04fe 100755
--- a/tools/archiver.py
+++ b/tools/archiver.py
@@ -153,7 +153,7 @@ class Archiver(object):
 
     """ Intercept index calls and fix up consistency argument """
     def index(self, **kwargs):
-        if ES_MAJOR == 5:
+        if ES_MAJOR in [5,6]:
             if kwargs.pop('consistency', None): # drop the key if present
                 if self.wait_for_active_shards: # replace with wait if defined
                     kwargs['wait_for_active_shards'] = self.wait_for_active_shards
@@ -173,7 +173,7 @@ class Archiver(object):
         self.consistency = config.get('elasticsearch', 'write', fallback='quorum')
         if ES_MAJOR == 2:
             pass
-        elif ES_MAJOR == 5:
+        elif ES_MAJOR in [5,6]:
             self.wait_for_active_shards = config.get('elasticsearch', 'wait', fallback=1)
         else:
             raise Exception("Unexpected elasticsearch version ", ES_VERSION)


Mime
View raw message