ponymail-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From s...@apache.org
Subject incubator-ponymail git commit: Add clear_scroll function in case of need
Date Thu, 12 Jan 2017 23:11:45 GMT
Repository: incubator-ponymail
Updated Branches:
  refs/heads/master da8a32e82 -> 331616004


Add clear_scroll function in case of need

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

Branch: refs/heads/master
Commit: 3316160046dca4a427d95f59fc32fdff9673d996
Parents: da8a32e
Author: Sebb <sebb@apache.org>
Authored: Thu Jan 12 23:11:34 2017 +0000
Committer: Sebb <sebb@apache.org>
Committed: Thu Jan 12 23:11:34 2017 +0000

----------------------------------------------------------------------
 tools/elastic.py | 10 ++++++++++
 1 file changed, 10 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ponymail/blob/33161600/tools/elastic.py
----------------------------------------------------------------------
diff --git a/tools/elastic.py b/tools/elastic.py
index adbd64b..427273d 100755
--- a/tools/elastic.py
+++ b/tools/elastic.py
@@ -92,3 +92,13 @@ class Elastic:
     
     def bulk(self, actions, **kwargs):
         return helpers.bulk(self.es, actions, **kwargs)
+
+    """ 
+        Call this to release the scroll id and its resources
+
+        It looks like the Python library already releases the SID
+        if the caller scrolls to the end of the results, so only need to call this
+        when terminating scrolling early.
+    """
+    def clear_scroll(self, *args, **kwargs):
+        return self.es.clear_scroll(*args, **kwargs)


Mime
View raw message