Skip to content

Exit container when healthcheck request exceeds threshold #118

Description

@evanugarte

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

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions