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

Use requests session for persistent connection #6

Merged
merged 1 commit into from
Sep 26, 2024

Conversation

pineapplehunter
Copy link
Contributor

When working on large lock files, the script sometimes fails. (such as one used in super-productivity NixOS/nixpkgs#334933)
One of the errors I see is Temporary failure in name resolution, and I suspect it is because requests checks the DNS on every request.
By using a session, it should use a persistent connection for all requests to npm.

@jeslie0
Copy link
Owner

jeslie0 commented Sep 26, 2024

This all looks good to me!

@jeslie0 jeslie0 merged commit a86f416 into jeslie0:main Sep 26, 2024
@pineapplehunter pineapplehunter deleted the session branch September 27, 2024 15:53
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.

2 participants