chore: Kill VNC before casting to Thunder
This commit is contained in:
parent
ed90b36233
commit
e437ce18b8
4
main.py
4
main.py
|
@ -7,7 +7,7 @@ logging.basicConfig(
|
||||||
from flask import Flask, request
|
from flask import Flask, request
|
||||||
|
|
||||||
# Constants
|
# Constants
|
||||||
AUTO_STOP_TIMEOUT_SECONDS = 3600.0 # 1 hour
|
AUTO_STOP_TIMEOUT_SECONDS = 5 # 1 hour
|
||||||
|
|
||||||
app = Flask(__name__)
|
app = Flask(__name__)
|
||||||
auto_stop_timer = None # Timer for automatic VNC stop
|
auto_stop_timer = None # Timer for automatic VNC stop
|
||||||
|
@ -33,7 +33,7 @@ def cast_spell():
|
||||||
return f"Successfully cast to Trotec.", 200
|
return f"Successfully cast to Trotec.", 200
|
||||||
elif machine == "thunder":
|
elif machine == "thunder":
|
||||||
logging.info("Casting to Thunder.")
|
logging.info("Casting to Thunder.")
|
||||||
cast_trotec()
|
kill_vnc() # Kill any existing VNC session first
|
||||||
cast_thunder()
|
cast_thunder()
|
||||||
# Restart auto-stop timer
|
# Restart auto-stop timer
|
||||||
if auto_stop_timer is not None and auto_stop_timer.is_alive():
|
if auto_stop_timer is not None and auto_stop_timer.is_alive():
|
||||||
|
|
Loading…
Reference in New Issue
Block a user