Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix OverflowError occuring when sleep length is too large #50

Merged
merged 2 commits into from
Feb 25, 2023

Conversation

jdholtz
Copy link
Owner

@jdholtz jdholtz commented Feb 25, 2023

Fixes #44.

If a flight is too far out in the future, time.sleep could throw an OverflowError (Windows has a ~2 month limit). This PR fixes that issue by sleeping in two week intervals until the time of the check-in, ensuring an OverflowError will never occur.

Windows will overflow if you try to sleep for more than two months (The
overflow is much larger on Linux). Therefore, the 'safe_sleep' method
will sleep in two week intervals to ensure the sleep doesn't overflow.
@jdholtz jdholtz linked an issue Feb 25, 2023 that may be closed by this pull request
@jdholtz jdholtz merged commit 0221e96 into develop Feb 25, 2023
@jdholtz jdholtz deleted the fix-sleep branch February 25, 2023 00:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Sleep Length too Large
1 participant