-
Notifications
You must be signed in to change notification settings - Fork 2
Description
in the printing server there's some logic that tries to re-open the SSH tunnel there hasn't been a request in a while
this isnt working as expected, we have 2 options to explore (i dont know if either work)
exiting
We can make a docker restart the container instead, that will correctly open the tunnel
this one is tricky because the logic to make the entire container exit is running within a thread, which is ran by a server running uvicorn, which is ran by a command in what.sh. very tricky.
stopping the process running
get the process id of the ssh command ran from what.sh, and pass it into the python server. when we exceed the threshold, kill the existing command before starting up a new ssh connection
we already try to start up a new ssh connection in the server, so we just need new logic to stop the existing ssh process from what.sh