From 8dc4956ab17079997b93c9bc4eedf0b108405cf1 Mon Sep 17 00:00:00 2001 From: fred Date: Tue, 19 Mar 2024 23:37:47 +0100 Subject: [PATCH] fx --- RUNTIME/NODE.refresh.sh | 4 ++-- RUNTIME/PLAYER.refresh.sh | 23 +++++++++++++++-------- RUNTIME/SECTOR.refresh.sh | 2 +- 3 files changed, 18 insertions(+), 11 deletions(-) diff --git a/RUNTIME/NODE.refresh.sh b/RUNTIME/NODE.refresh.sh index dd6613bc..8ba33bd3 100755 --- a/RUNTIME/NODE.refresh.sh +++ b/RUNTIME/NODE.refresh.sh @@ -55,8 +55,8 @@ if [[ -d ~/.zen/tmp/${IPFSNODEID} ]]; then ## INFORM GPS LOCATION [[ -s ~/.zen/game/players/.current/GPS.json ]] \ && cp ~/.zen/game/players/.current/GPS.json ~/.zen/tmp/${IPFSNODEID}/ \ - && LAT=$(cat ~/.zen/tmp/${IPFSNODEID}/GPS.json | jq -r .lat) \ - && LON=$(cat ~/.zen/tmp/${IPFSNODEID}/GPS.json | jq -r .lon) \ + && LAT=$(cat ~/.zen/tmp/${IPFSNODEID}/GPS.json | jq -r .[].lat) \ + && LON=$(cat ~/.zen/tmp/${IPFSNODEID}/GPS.json | jq -r .[].lon) \ && echo "LAT=${LAT}; LON=${LON}" > ~/.zen/GPS ## REFRESH TIMESTAMPING diff --git a/RUNTIME/PLAYER.refresh.sh b/RUNTIME/PLAYER.refresh.sh index b304362e..5496280f 100755 --- a/RUNTIME/PLAYER.refresh.sh +++ b/RUNTIME/PLAYER.refresh.sh @@ -102,8 +102,8 @@ for PLAYER in ${PLAYERONE[@]}; do NOWCHAIN=$(cat ~/.zen/game/players/${PLAYER}/ipfs/moa/.chain) LASTCHAIN=$(cat ~/.zen/game/players/${PLAYER}/ipfs/moa/.chain.* | tail -n 1) try=$(cat ~/.zen/game/players/${PLAYER}/ipfs/moa/.try 2>/dev/null) || try=3 - echo "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
" - echo "TW REFRESH FAILED" + echo "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" + echo "$myIPFS/ipns/${ASTRONAUTENS}'>TW REFRESH FAILED" echo ">> %%% WARNING TRY LEFT : $try %%%" echo "------------------------------------------------" echo " * LAST" @@ -111,16 +111,23 @@ for PLAYER in ${PLAYERONE[@]}; do echo "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" ## SEND AN EMAIL ALERT TO PLAYER - echo "TW REFRESH FAILED" > ~/.zen/tmp/result + echo " +TW LOADING TIMEOUT" > ~/.zen/tmp/result echo "
------------------------------------------------" >> ~/.zen/tmp/result echo "
" >> ~/.zen/tmp/result - echo "
TW[-1]" >> ~/.zen/tmp/result - echo "
TW[0]" >> ~/.zen/tmp/result + echo "
TW[-1]: /ipfs/${LASTCHAIN}" >> ~/.zen/tmp/result + echo "
TW[0]: /ipfs/${NOWCHAIN}" >> ~/.zen/tmp/result echo "
" >> ~/.zen/tmp/result echo "
%%% WARNING %%% $try TRY LEFT %%%" >> ~/.zen/tmp/result echo "
------------------------------------------------" >> ~/.zen/tmp/result - echo "
REPAIR BY SAVING ONLINE
" >> ~/.zen/tmp/result - echo "COMMAND :
ipfs name publish --key=${PLAYER} /ipfs/${NOWCHAIN}" >> ~/.zen/tmp/result + echo "
ipfs name publish --key=${PLAYER} /ipfs/${NOWCHAIN}" >> ~/.zen/tmp/result echo "" >> ~/.zen/tmp/result @@ -132,7 +139,7 @@ for PLAYER in ${PLAYERONE[@]}; do try=$((try-1)) echo "$try" > ~/.zen/game/players/${PLAYER}/ipfs/moa/.try - $MY_PATH/../tools/mailjet.sh "${PLAYER}" ~/.zen/tmp/result "TW[+1] REFRESH WARNING" + $MY_PATH/../tools/mailjet.sh "${PLAYER}" ~/.zen/tmp/result "TW LOADING TIMEOUT" continue diff --git a/RUNTIME/SECTOR.refresh.sh b/RUNTIME/SECTOR.refresh.sh index 8cae080e..5008d612 100755 --- a/RUNTIME/SECTOR.refresh.sh +++ b/RUNTIME/SECTOR.refresh.sh @@ -358,7 +358,7 @@ for SECTOR in ${SECTORS[@]}; do ############################### echo "% PUBLISHING ${SECTOR} ${myIPFS}/ipns/${TODATENS}" start=`date +%s` - ipfs --timeout 180s name publish -k ${TODATE}${G1PUB} /ipfs/${IPFSPOP} + ipfs --timeout 240s name publish -k ${TODATE}${G1PUB} /ipfs/${IPFSPOP} ipfs key rm ${YESTERDATE}${G1PUB} ${G1PUB} > /dev/null 2>&1 ######################################################