Sometimes a database could not be created because of the connection to 'template1'
This fix should correct the problem (tested with 1 second but reduced to 0.2 second) bzr revid: olt@tinyerp.com-20081208075558-1kfm6rf25nrinwfv
This commit is contained in:
@@ -67,6 +67,7 @@ class db(netsvc.Service):
|
||||
db = sql_db.db_connect('template1', serialize=1)
|
||||
db.truedb.autocommit()
|
||||
cr = db.cursor()
|
||||
time.sleep(0.2)
|
||||
cr.execute('CREATE DATABASE ' + db_name + ' ENCODING \'unicode\'')
|
||||
cr.close()
|
||||
class DBInitialize(object):
|
||||
|
||||
Reference in New Issue
Block a user