Unsure to fill init for every database for issue610
This commit is contained in:
1 parent
50619552cf
commit
f51d81cccc
1 file changed
+1
-1
+1
-1
@@ -84,13 +84,13 @@ class TrytonServer(object):
|
||||
update_module = False
|
||||
init = {}
|
||||
for db_name in CONFIG["db_name"]:
|
||||
init[db_name] = False
|
||||
try:
|
||||
cursor = pooler.get_db_only(db_name).cursor()
|
||||
except psycopg2.OperationalError:
|
||||
self.logger.error("could not connect to database '%s'!" % db_name,)
|
||||
continue
|
||||
|
||||
init[db_name] = False
|
||||
if CONFIG['init']:
|
||||
if not cursor.test():
|
||||
self.logger.info("init db")
|
||||
|
||||
Reference in new issue
Block a user