Skip to content

Commit 6d5d283

Browse files
committed
CHANGES:
- autoupdate structure changes in DCS, SRS and LotAtc to allow a separate "announce" structure (auto migrated).
1 parent 648c268 commit 6d5d283

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

core/data/impl/nodeimpl.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -376,6 +376,7 @@ async def init_instances(self):
376376
f"There is an instance already with the same server name or bot port.")
377377

378378
async def update_db(self):
379+
rc = 0
379380
# Initialize the cluster tables ...
380381
async with self.cpool.connection() as conn:
381382
async with conn.transaction():
@@ -434,10 +435,10 @@ async def update_db(self):
434435
cursor = await conn.execute('SELECT version FROM version')
435436
self.db_version = (await cursor.fetchone())[0]
436437
rc = await asyncio.to_thread(migrate, self.node, old_version, self.db_version)
437-
if rc != -2:
438-
self.log.info(f'- Database upgraded from {old_version} to {self.db_version}.')
439-
if rc in [-1, -2]:
440-
sys.exit(rc)
438+
if rc != -2:
439+
self.log.info(f'- Database upgraded from {old_version} to {self.db_version}.')
440+
if rc in [-1, -2]:
441+
sys.exit(rc)
441442

442443
def install_plugins(self):
443444
for file in Path('plugins').glob('*.zip'):

0 commit comments

Comments
 (0)