]> git.openstreetmap.org Git - nominatim.git/blobdiff - nominatim/nominatim.py
forgot to index last rank
[nominatim.git] / nominatim / nominatim.py
old mode 100644 (file)
new mode 100755 (executable)
index 73456ff..6d5e4af
@@ -1,4 +1,4 @@
-#! /usr/bin/env python
+#! /usr/bin/env python3
 #-----------------------------------------------------------------------------
 # nominatim - [description]
 #-----------------------------------------------------------------------------
 #-----------------------------------------------------------------------------
 # nominatim - [description]
 #-----------------------------------------------------------------------------
@@ -146,7 +146,7 @@ class DBConnection(object):
                 return True
         except psycopg2.extensions.TransactionRollbackError as e:
             if e.pgcode == '40P01':
                 return True
         except psycopg2.extensions.TransactionRollbackError as e:
             if e.pgcode == '40P01':
-                log.debug("Deadlock detected, retry.")
+                log.info("Deadlock detected (params = {}), retry.".format(self.current_params))
                 self.cursor.execute(self.current_query, self.current_params)
             else:
                 raise
                 self.cursor.execute(self.current_query, self.current_params)
             else:
                 raise
@@ -175,7 +175,8 @@ class Indexer(object):
 
         if self.maxrank == 30:
             self.index(InterpolationRunner())
 
         if self.maxrank == 30:
             self.index(InterpolationRunner())
-            self.index(RankRunner(30))
+
+        self.index(RankRunner(self.maxrank))
 
     def index(self, obj):
         """ Index a single rank or table. `obj` describes the SQL to use
 
     def index(self, obj):
         """ Index a single rank or table. `obj` describes the SQL to use