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/09/18 10:09:23 UTC

[incubator-ponymail-foal] branch master updated: Unused

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


The following commit(s) were added to refs/heads/master by this push:
     new 0013b12  Unused
0013b12 is described below

commit 0013b12b1b3e0e6ac0ef26db80b549488e523e6f
Author: Sebb <se...@apache.org>
AuthorDate: Sat Sep 18 11:09:12 2021 +0100

    Unused
---
 tools/migrate.py | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/tools/migrate.py b/tools/migrate.py
index d0b6ee3..ab19fa8 100644
--- a/tools/migrate.py
+++ b/tools/migrate.py
@@ -59,7 +59,7 @@ class MultiDocProcessor:
         self.start_time = time.time()
         self.queue_pointer = 0
         self.num_processes = num_processes
-        for i in range(0, num_processes):
+        for _ in range(0, num_processes):
             q = multiprocessing.Queue()
             p = multiprocessing.Process(
                 target=self.start,
@@ -261,7 +261,7 @@ async def main(no_jobs, graceful):
     dbname_attachment = new_dbprefix + "-attachment"
 
     # Let's get started..!
-    start_time = time.time()
+    # start_time = time.time()
     count = await ols_es_async.count(index=old_dbname, doc_type="mbox")
     no_emails = count["count"]
 
@@ -270,8 +270,8 @@ async def main(no_jobs, graceful):
 
     processes = MultiDocProcessor(old_es_url, new_es_url, process_document, no_jobs)
 
-    processed_last_count = 0
-    current_executor = 0
+    # processed_last_count = 0
+    # current_executor = 0
     docs_read = 0
     async for doc in async_scan(
         client=ols_es_async,
@@ -299,7 +299,7 @@ async def main(no_jobs, graceful):
     processes.stop()
 
     # Process attachments
-    start_time = time.time()
+    # start_time = time.time()
     processes = MultiDocProcessor(old_es_url, new_es_url, process_attachment, no_jobs, graceful)
     docs_read = 0
     count = await ols_es_async.count(index=old_dbname, doc_type="attachment")