autocommit
This commit is contained in:
8
scripts/monitor_server.sh
Executable file
8
scripts/monitor_server.sh
Executable file
@@ -0,0 +1,8 @@
|
||||
#!/bin/bash
|
||||
|
||||
echo "conencting to 219 and retrieving supervisor log output:"
|
||||
ssh uad@192.168.1.219 "tail -f /home/uad/tello-commander/src/server/supervisor/tello-server.out.log" | \
|
||||
awk '
|
||||
/WARNING/ {print "\033[1;33m" $0 "\033[0m"}
|
||||
/ERROR|CRIT/ {print "\033[1;31m" $0 "\033[0m"}
|
||||
'
|
||||
@@ -1,5 +1,12 @@
|
||||
#!/bin/bash
|
||||
|
||||
while true; do
|
||||
echo -e "\033[94m[INFO]\033[0m Pulling latest changes from 'refactor/v2'..."
|
||||
grc git pull origin refactor/v2 --no-rebase
|
||||
|
||||
git pull origin refactor/v2 $@
|
||||
echo -e "\033[94m[INFO]\033[0m Restarting 'tello-server' using supervisorctl..."
|
||||
grc sudo supervisorctl restart tello-server
|
||||
|
||||
echo -e "\033[92m[SUCCESS]\033[0m Cycle complete. Waiting for the next iteration..."
|
||||
sleep 5
|
||||
done
|
||||
|
||||
@@ -34,9 +34,9 @@ async def maintain_connection_to_tello(state):
|
||||
state["connection"] = "OK"
|
||||
except TimeoutExpiredException as tee:
|
||||
logger.warning(f"failing to connect tello, timeout duration was {CONN_ATTEMPT_TIMEOUT}s")
|
||||
if CONN_ATTEMPT_TIMEOUT < 50:
|
||||
if CONN_ATTEMPT_TIMEOUT < 51:
|
||||
CONN_ATTEMPT_TIMEOUT += 5
|
||||
elif CONN_ATTEMPT_TIMEOUT > 10:
|
||||
elif CONN_ATTEMPT_TIMEOUT > 9:
|
||||
CONN_ATTEMPT_TIMEOUT -= 5
|
||||
IS_CONNECTED = False
|
||||
state["connection"] = "NOK"
|
||||
@@ -53,18 +53,7 @@ async def maintain_connection_to_tello(state):
|
||||
IS_CONNECTED = False
|
||||
state["connection"] = "NOK"
|
||||
# state["stats"] = "no stats available" -> final stats state görebilmek için bu kapalı kalsın"""
|
||||
"""devices = await loop.run_in_executor(executor, nmcli.device)
|
||||
for device in devices:
|
||||
if device.device == ifname:
|
||||
if device.connection == tello_ssid:
|
||||
logger.debug("tello seems connected")
|
||||
IS_CONNECTED = True
|
||||
state["connection"] = "OK"
|
||||
else:
|
||||
logger.warning("tello disconnected, scanning")
|
||||
IS_CONNECTED = False
|
||||
state["connection"] = "NOK"
|
||||
#state["stats"] = "no stats available" -> final stats state görebilmek için bu kapalı kalsın"""
|
||||
|
||||
|
||||
async def collect_flight_stats(state):
|
||||
loop = asyncio.get_event_loop()
|
||||
|
||||
Reference in New Issue
Block a user