General Actions to handlers Refacto
This commit is contained in:
@@ -3,6 +3,7 @@ import yargs from 'yargs/yargs'
|
||||
import { hideBin } from 'yargs/helpers'
|
||||
import 'node:process'
|
||||
import {RedisConnexion} from '../redisConnexion.js'
|
||||
import { busReplyRoute } from '../bus/publishActionReply.js'
|
||||
import {configHelper} from '../configHelper.js'
|
||||
import {gpsServer} from './gpsServer.js'
|
||||
import * as systemMesh from './actions/system/index.js'
|
||||
@@ -53,6 +54,7 @@ let cfgh = new configHelper({
|
||||
|
||||
function meshRedisConns(mesh, meshName, debug, rootConfig) {
|
||||
const { redis, ...meshConfig } = mesh
|
||||
const busRoute = busReplyRoute(rootConfig.gps, meshName)
|
||||
return redis.map(cfg =>
|
||||
new RedisConnexion({
|
||||
debug,
|
||||
@@ -60,6 +62,8 @@ function meshRedisConns(mesh, meshName, debug, rootConfig) {
|
||||
redisId: cfg.redisId,
|
||||
meshName,
|
||||
meshModule: meshModules[meshName],
|
||||
senderId: busRoute?.senderId,
|
||||
actionsReply: busRoute?.actionsReply,
|
||||
})
|
||||
)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user