I host a FastAPI api that creates a bot to join in to a daily.co realtime chat. I start a bot by calling an API endpoint that creates a subprocess with subprocess.Popen("python -m bot")
. Now after a while fly decides that the machine is idle and shuts it down despite the bot being active all the time (it’s an async function that is being await
ed).
auto_stop_machines
is active, and I want to machine to stop when there is really no activity. So I wonder whether I can keep the machine alive with HTTP calls or make fly aware of that process. I wonder whether the processes
section in the fly.toml would help me with this?
Any hints! Many thanks!