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

GoingToCamp: Fix session usage #342

Merged
merged 1 commit into from
Apr 29, 2024
Merged

GoingToCamp: Fix session usage #342

merged 1 commit into from
Apr 29, 2024

Conversation

damz
Copy link
Contributor

@damz damz commented Apr 29, 2024

Description

The GoingToCamp provider doesn't reuse connections to the API because it doesn't use the requests session correctly:

[2024-04-28 19:08:44] DEBUG    Starting new HTTPS connection (1): reservation.pc.gc.ca:443                                                                                        
[2024-04-28 19:08:45] DEBUG    https://reservation.pc.gc.ca:443 "GET /api/resourceLocation HTTP/1.1" 200 None                                                                     
[2024-04-28 19:08:45] DEBUG    Starting new HTTPS connection (1): reservation.pc.gc.ca:443                                                                                        
[2024-04-28 19:08:45] DEBUG    https://reservation.pc.gc.ca:443 "GET /api/maps HTTP/1.1" 200 None  

Has This Been Tested?

Yes, with this change:

[2024-04-28 19:09:35] DEBUG    Starting new HTTPS connection (1): reservation.pc.gc.ca:443                                                                                        
[2024-04-28 19:09:36] DEBUG    https://reservation.pc.gc.ca:443 "GET /api/resourceLocation HTTP/1.1" 200 285741                                                                   
[2024-04-28 19:09:36] DEBUG    https://reservation.pc.gc.ca:443 "GET /api/maps HTTP/1.1" 200 4196808    

Checklist:

  • I've read the contributing guidelines of this project
  • I've installed and used .pre_commit on all my code
  • I have documented my code, particularly in hard-to-understand areas
  • I have made any necessary corresponding changes to the documentation

@juftin
Copy link
Owner

juftin commented Apr 29, 2024

Nice, thank you. I think the GoingToCamp provider predates when the session property was part of the BaseProvider. This is a great improvement.

@juftin juftin merged commit d0339e9 into juftin:main Apr 29, 2024
7 checks passed
github-actions bot added a commit that referenced this pull request Apr 29, 2024
# [v0.32.5](v0.32.4...v0.32.5) (2024-04-29)

## 🐛 Bug Fixes
- [`d0339e9`](d0339e9)  goingtocamp session usage (Issues: [`#342`](#342))

[skip ci]
@juftin
Copy link
Owner

juftin commented Apr 29, 2024

🎉 This PR is included in version 0.32.5 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants