refacto & cleanup of toplevel functions, use @p42/p42Modules, test microframework

This commit is contained in:
STEINNI
2026-06-14 17:39:52 +00:00
parent c399f9ddb4
commit 7435d96135
11 changed files with 427 additions and 108 deletions
+3 -3
View File
@@ -1,5 +1,5 @@
import { AccesRights } from '../accesRights.js'
import { createMysqlPool } from '../mysqlClient.js'
import { MySQLClient } from '@p42/p42modules'
import { SimRepository } from './simRepository.js'
import { ArenaGroom } from './arenaGroom.js'
import { MaestroState } from './orchestrationState.js'
@@ -61,8 +61,8 @@ export class maestroServer {
console.error('[Maestro] Missing mysql config')
return(false)
}
this.db = await createMysqlPool(mysqlCfg)
this.simRepo = new SimRepository(this.db, this.debug)
this.db = await MySQLClient.createPool(mysqlCfg)
this.simRepo = new SimRepository(this.db, MySQLClient.resolveDatabases(mysqlCfg), this.debug)
if(this.debug) console.log('[Maestro] MySQL pool ready')
return(true)
}