limit safe_request retries#32
Conversation
|
@pyro2927 I had a chance for a test with this PR and I think I've got the retries on the wrong request to the server. Currently multiple tries are only on the final attempt in I'm not sure if just |
|
@jpetermans I've found it useful for both. Southwest seems to lie more or less, as I wouldn't consider an early-yet-valid to checkin to warrant |
|
Code Climate has analyzed commit 2f564b9 and detected 0 issues on this pull request. The test coverage on the diff in this pull request is 89.4% (50% is the threshold). This pull request will bring the total coverage in the repository to 91.4% (0.0% change). View more on Code Climate. |
|
I agree with you on the server response, and script still should keep trying right up to when the check-in window opens. Hopefully this PR accomplishes that without hitting the server with a lot of true bad requests, just check-in attempts. Two additional changes with this latest commit:
|
Prevent unnecessary requests to the reservation server when reservation data is incorrect or the server is unavailable. Multiple repeat requests only necessary for checkin().
@pyro2927, I set the number of retries under checkin() based on CHECKIN_EARLY_SECONDS and CHECKIN_INTERVAL_SECONDS. Seemed like a sane window for retries, but feel free to change. With this and recent your refactor I put some static settings in the init of the reservation class. This made that info easier to reference in both files in this commit.