refacto & cleanup of toplevel functions, use @p42/p42Modules, test microframework
This commit is contained in:
@@ -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)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user