Closed valdisrigdon closed 4 years ago
This is a bug, it should be subtracting 60s, to make sure you always have valid credentials. Thanks for the bug report! This has been fixed in 4.2.2.
The fix doesn't quite work; what's happening now is that it wakes up 60s early, but then discovers that nothing is expired, then tries to sleep until something expires, which is usually just under 60s - 60s, so it's a negative sleep time.
main.py
needs to refresh credentials if they are expired or will expire in less than or equal to 60s as well.
@mbarneyjr Should I open a new issue for this? With the fix that when in, auto-refresh is pretty much broken.
Why does https://github.com/trek10inc/awsume/blob/master/awsume/autoawsume/main.py#L69 add 60s to the sleep time? This is leaving the session with invalid credentials during that 60s.