]> git.openstreetmap.org Git - nominatim.git/blobdiff - nominatim/indexer/progress.py
minimum counts for tokens should always be 1
[nominatim.git] / nominatim / indexer / progress.py
index bc1d68a3c1c50a6f61ae93c313f9782f26d9135b..33df37fbaec06df141462adafa14be012a95f043 100644 (file)
@@ -18,7 +18,7 @@ class ProgressLogger:
     """ Tracks and prints progress for the indexing process.
         `name` is the name of the indexing step being tracked.
         `total` sets up the total number of items that need processing.
     """ Tracks and prints progress for the indexing process.
         `name` is the name of the indexing step being tracked.
         `total` sets up the total number of items that need processing.
-        `log_interval` denotes the interval in seconds at which progres
+        `log_interval` denotes the interval in seconds at which progress
         should be reported.
     """
 
         should be reported.
     """
 
@@ -55,7 +55,7 @@ class ProgressLogger:
 
         self.next_info += int(places_per_sec) * self.log_interval
 
 
         self.next_info += int(places_per_sec) * self.log_interval
 
-    def done(self) -> None:
+    def done(self) -> int:
         """ Print final statistics about the progress.
         """
         rank_end_time = datetime.now()
         """ Print final statistics about the progress.
         """
         rank_end_time = datetime.now()
@@ -70,3 +70,5 @@ class ProgressLogger:
         LOG.warning("Done %d/%d in %d @ %.3f per second - FINISHED %s\n",
                     self.done_places, self.total_places, int(diff_seconds),
                     places_per_sec, self.name)
         LOG.warning("Done %d/%d in %d @ %.3f per second - FINISHED %s\n",
                     self.done_places, self.total_places, int(diff_seconds),
                     places_per_sec, self.name)
+
+        return self.done_places