Is there a way to have CherryPy (running on :8080, it's only function being a listener for SIGUSR1) kill a process if it hasn't been pinged in a certain number of seconds?
Certainly the Python code for process killing is not in question, simply the way CherryPy would detect the last ping, and constantly compare it to the current time - Killing a process if it hasn't been pinged in a certain number of seconds.
Note that if Javascript is doing the pinging (via setInterval()
), an infinite loop within the CherryPy code would cause the .ajax()
request to hang and/or timeout, unless there is a way to have .ajax()
only ping and not wait for any type of response.
Thanks for any tips you guys can provide!
Mason