I can’t seem to find any information on this anywhere: What exactly does the Stop button do, hat shows up while a task is running?
I have a time consuming task (3-5h) that can be started via streamlit. If the user has to end the process for some reason (progress is cached so it can be continued at any time), the stop button in the top right corner does the trick. However, that isn’t exactly a graceful shutdown.
Now I’m wondering if it’s at all possible to handle the event of the stop button being pressed?
I’m thinking of something similar to a keyboard interrupt that can be handled with
try/catch in regular python.
Any help or pointers to more information would be appreciated!