FLO Crash Error Resolution
This commit is contained in:
parent
1ca1194688
commit
4e676e97c5
@ -10,7 +10,7 @@ RUN update-ca-certificates
|
|||||||
|
|
||||||
# Install flosight
|
# Install flosight
|
||||||
WORKDIR /flosight
|
WORKDIR /flosight
|
||||||
ADD https://api.github.com/repos/oipwg/flocore-node/git/refs/heads/master flocore-node-version.json
|
ADD https://api.github.com/repos/ranchimall/flocore-node/git/refs/heads/master flocore-node-version.json
|
||||||
RUN git clone https://github.com/ranchimall/flocore-node
|
RUN git clone https://github.com/ranchimall/flocore-node
|
||||||
ADD https://api.github.com/repos/oipwg/flosight-ui/git/refs/heads/master flosight-ui-version.json
|
ADD https://api.github.com/repos/oipwg/flosight-ui/git/refs/heads/master flosight-ui-version.json
|
||||||
ADD https://api.github.com/repos/oipwg/flosight-api/git/refs/heads/master flosight-api-version.json
|
ADD https://api.github.com/repos/oipwg/flosight-api/git/refs/heads/master flosight-api-version.json
|
||||||
|
|||||||
36
start.sh
36
start.sh
@ -76,21 +76,21 @@ curl --silent http://localhost:3001/api/status?q=getBestBlockHash > currentHealt
|
|||||||
echo 'different' > previousHealthCheck.log
|
echo 'different' > previousHealthCheck.log
|
||||||
|
|
||||||
# Every 5 minutes
|
# Every 5 minutes
|
||||||
while true; do
|
#while true; do
|
||||||
# Check to see if the most recent block hash is the same as the last time we checked.
|
# # Check to see if the most recent block hash is the same as the last time we checked.
|
||||||
if [ "$(cat previousHealthCheck.log)" == "$(cat currentHealthCheck.log)" ]
|
# if [ "$(cat previousHealthCheck.log)" == "$(cat currentHealthCheck.log)" ]
|
||||||
then
|
# then
|
||||||
# Restart instance
|
# # Restart instance
|
||||||
echo "NO NEW BLOCKS IN 5+ MINUTES - RESTARTING PROCESS"
|
# echo "NO NEW BLOCKS IN 5+ MINUTES - RESTARTING PROCESS"
|
||||||
kill -2 $(cat /data/flosight.pid)
|
# kill -2 $(cat /data/flosight.pid)
|
||||||
wait $(cat /data/flosight.pid)
|
# wait $(cat /data/flosight.pid)
|
||||||
./node_modules/flocore-node/bin/flocore-node start >> /data/latest.log &
|
# ./node_modules/flocore-node/bin/flocore-node start >> /data/latest.log &
|
||||||
# Store PID for later
|
# # Store PID for later
|
||||||
echo $! > /data/flosight.pid
|
# echo $! > /data/flosight.pid
|
||||||
fi
|
# fi
|
||||||
# Wait 5 minutes before checking again
|
# # Wait 5 minutes before checking again
|
||||||
timeout 5m tail -f /data/latest.log
|
# timeout 5m tail -f /data/latest.log
|
||||||
|
#
|
||||||
mv currentHealthCheck.log previousHealthCheck.log
|
# mv currentHealthCheck.log previousHealthCheck.log
|
||||||
curl --silent http://localhost:3001/api/status?q=getBestBlockHash > currentHealthCheck.log
|
# curl --silent http://localhost:3001/api/status?q=getBestBlockHash > currentHealthCheck.log
|
||||||
done;
|
#done;
|
||||||
Loading…
Reference in New Issue
Block a user