Allow first-start cache initialization and restore durability before roster creation
Core tests / core (push) Successful in 30s
Core tests / core (push) Successful in 30s
This commit is contained in:
@@ -70,13 +70,16 @@ def main(root):
|
|||||||
subprocess.run(['docker','run','-d','--name','azerothai-classic-world','--network','azerothai-classic','--cpus','2','--memory','3g','--user','1000:1000','-v',str(root)+':/work','-w','/work/run/bin','-p','127.0.0.1:8086:8086','azerothai-classic-builder:local','bash','-c','exec 3<>/work/run/console; exec ./mangosd -c /work/run/etc/mangosd.conf <&3'],check=True,capture_output=True)
|
subprocess.run(['docker','run','-d','--name','azerothai-classic-world','--network','azerothai-classic','--cpus','2','--memory','3g','--user','1000:1000','-v',str(root)+':/work','-w','/work/run/bin','-p','127.0.0.1:8086:8086','azerothai-classic-builder:local','bash','-c','exec 3<>/work/run/console; exec ./mangosd -c /work/run/etc/mangosd.conf <&3'],check=True,capture_output=True)
|
||||||
elif not state['Running']:subprocess.run(['docker','start','azerothai-classic-world'],check=True,capture_output=True)
|
elif not state['Running']:subprocess.run(['docker','start','azerothai-classic-world'],check=True,capture_output=True)
|
||||||
status('starting isolated Classic world; bot login disabled')
|
status('starting isolated Classic world; bot login disabled')
|
||||||
for _ in range(120):
|
for attempt in range(720):
|
||||||
state=inspect('azerothai-classic-world')
|
state=inspect('azerothai-classic-world')
|
||||||
if not state or not state['Running']:raise RuntimeError('Classic world exited during startup; inspect container log')
|
if not state or not state['Running']:raise RuntimeError('Classic world exited during startup; inspect container log')
|
||||||
log=subprocess.run(['docker','logs','--tail','60','azerothai-classic-world'],capture_output=True,text=True).stdout
|
log=subprocess.run(['docker','logs','--since',state['StartedAt'],'azerothai-classic-world'],capture_output=True,text=True).stdout
|
||||||
if 'SERVER STARTUP TIME' in log or 'World initialized' in log:break
|
if 'SERVER STARTUP TIME' in log or 'World initialized' in log:break
|
||||||
|
if attempt%12==0:status('Classic first startup is building caches; bot login disabled',waitedSeconds=attempt*5)
|
||||||
time.sleep(5)
|
time.sleep(5)
|
||||||
else:raise RuntimeError('Classic startup not confirmed within ten minutes')
|
else:raise RuntimeError('Classic startup not confirmed within sixty minutes; inspect cache progress')
|
||||||
|
# Restore full durability before any persistent characters are created.
|
||||||
|
mysql('SET GLOBAL innodb_flush_log_at_trx_commit=1; SET GLOBAL sync_binlog=1;')
|
||||||
status('creating 50 level-one native characters; bot login disabled')
|
status('creating 50 level-one native characters; bot login disabled')
|
||||||
with fifo.open('w') as console:
|
with fifo.open('w') as console:
|
||||||
for bot in roster:
|
for bot in roster:
|
||||||
|
|||||||
Reference in New Issue
Block a user