[Migrated] How to "catch" an asynchronous task timeout?
Originally from: https://github.com/Miserlou/Zappa/issues/1812 by mojimi
Sorry if I missed this in the docs, but how can I "catch" that a certain asynchronous task has received a timeout?
I am having the same problem and I could solve it yet
You can check the cloudwatch logs for the timeout log. Other than that I don't believe you can know unless you manage state yourself.
old migrated issue, closing.
You can detect an imminent task timeout by creating a separate thread and checking the remaining duration at regular intervals in the other thread and perform an action when it is close to timeout. It's pretty complicated to implement, but this is the technique that sentry.io uses in their monitoring SDK.