Observer embryo, Maestro done
This commit is contained in:
@@ -0,0 +1,22 @@
|
||||
|
||||
export const construct = (redisCnx) => {
|
||||
}
|
||||
|
||||
export const methods = {
|
||||
|
||||
dispatchArenaMessage(msg, chan) {
|
||||
const maestro = this.config.maestro
|
||||
if(!maestro || !this.maestroSrv) return(false)
|
||||
|
||||
if(this.matchesChan(chan, maestro.lifecycle?.godsReadyChannel ?? 'arena:gods:ready')) {
|
||||
if(msg.eventType === 'readyToStart') {
|
||||
this.maestroSrv.onReadyToStart(msg)
|
||||
return(true)
|
||||
}
|
||||
}
|
||||
|
||||
if(this.debug) console.log(`[${this.redisId}] Arena message (unhandled):`, msg.eventType, chan)
|
||||
return(false)
|
||||
},
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user