mailgun/pylemma — pull request #4 by russjones (2014-12-06 02:50:21+00:00)
Title: Increase timeout period.

**Purpose**

Traffic on the internet can often take much longer than 10 seconds to transmit. This is especially so if large messages are being sent. This commit increases that timeout to 95 seconds so even large messages should fall within the acceptable window.

**Implementation**

Looking at the `check_timestamp` function in `lemma.httpsign`, imagine you are at some time `t`. The request can not be from more than `t + MAX_SKEW_SEC` in the future. The request can also not be from more than `t - (CACHE_TIMEOUT - MAX_SKEW_SEC)` in the past. Therefore, if we want to allow a 95 second window, we have to increase `CACHE_TIMEOUT` and/or decrease `MAX_SKEW_SEC`.

This was done by changing the constants, `CACHE_TIMEOUT` is now `100 seconds` and `MAX_SKEW_SEC` is `5 seconds`.

**Related Commit**
https://github.com/mailgun/lemma/pull/3