finished actions => handlers refacto, small bux fix in maestro => Test maestro1 OK
This commit is contained in:
@@ -78,9 +78,9 @@ export class maestroServer {
|
||||
|
||||
refreshPrepareQuorum() {
|
||||
if(!this.arenaCnx) return
|
||||
const { prepareAckChannel, readyTimeoutMs } = this.getMaestroSettings()
|
||||
const { lifecycle, readyTimeoutMs } = this.getMaestroSettings()
|
||||
this.prepareQuorum = new PrepareQuorum({
|
||||
ackChannel: prepareAckChannel,
|
||||
ackChannel: lifecycle.prepareAckChannel,
|
||||
timeoutMs: readyTimeoutMs,
|
||||
matchesChan: this.arenaCnx.matchesChan.bind(this.arenaCnx),
|
||||
debug: this.debug,
|
||||
|
||||
@@ -6,8 +6,8 @@ import { RedisConnexion } from '../redisConnexion.js'
|
||||
import { busReplyRoute } from '../bus/publishActionReply.js'
|
||||
import { configHelper } from '../configHelper.js'
|
||||
import { maestroServer } from './maestroServer.js'
|
||||
import * as systemMesh from './actions/system/index.js'
|
||||
import * as arenaMesh from './actions/arena/index.js'
|
||||
import * as systemMesh from './handlers/system/index.js'
|
||||
import * as arenaMesh from './handlers/arena/index.js'
|
||||
|
||||
const meshModules = {
|
||||
system: systemMesh,
|
||||
|
||||
+14
-2
@@ -1,5 +1,11 @@
|
||||
#!/bin/sh
|
||||
|
||||
SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)"
|
||||
# shellcheck source=../lib/resolveConfigPath.sh
|
||||
. "$SCRIPT_DIR/../lib/resolveConfigPath.sh"
|
||||
|
||||
CONFIG="$(resolveConfigPath "$SCRIPT_DIR" "${1:-${CONFIG:-../config.json}}")"
|
||||
|
||||
set -a
|
||||
. /etc/p42/secrets.env
|
||||
set +a
|
||||
@@ -7,11 +13,16 @@ set +a
|
||||
daemon=p42Maestro
|
||||
logfile=maestro.log
|
||||
|
||||
if [ ! -f "$CONFIG" ]; then
|
||||
echo "Config file not found: $CONFIG" >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
pid=$(pgrep -f "$daemon")
|
||||
|
||||
if [ -z "$pid" ]
|
||||
then
|
||||
node "${daemon}.js" --debug > "$logfile" 2>&1 &
|
||||
node "${daemon}.js" --config "$CONFIG" --debug > "$logfile" 2>&1 &
|
||||
pid=$!
|
||||
|
||||
sleep 1
|
||||
@@ -19,12 +30,13 @@ then
|
||||
if kill -0 "$pid" 2>/dev/null
|
||||
then
|
||||
echo ""
|
||||
echo "$daemon is now running with PID=$pid"
|
||||
echo "$daemon is now running with PID=$pid (config=$CONFIG)"
|
||||
echo ""
|
||||
else
|
||||
echo ""
|
||||
echo "Failed to start $daemon. Check maestro.log"
|
||||
echo ""
|
||||
exit 1
|
||||
fi
|
||||
else
|
||||
echo ""
|
||||
|
||||
Reference in New Issue
Block a user