Zappa icon indicating copy to clipboard operation
Zappa copied to clipboard

[Migrated] How to "catch" an asynchronous task timeout?

Open jneves opened this issue 5 years ago • 2 comments

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?

jneves avatar Feb 20 '21 12:02 jneves

I am having the same problem and I could solve it yet

erwinfeser avatar Mar 05 '21 14:03 erwinfeser

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.

monkut avatar Jul 16 '22 06:07 monkut

old migrated issue, closing.

monkut avatar Aug 16 '22 05:08 monkut

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.

python1981 avatar Nov 07 '22 07:11 python1981