-
Notifications
You must be signed in to change notification settings - Fork 427
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
Configurable Session Class #91
Conversation
# Conflicts: # .gitignore # pynamodb/connection/base.py # pynamodb/models.py # pynamodb/tests/test_model.py # pynamodb/tests/test_table_connection.py # pynamodb/throttle.py
This is useful for tweaking the ConnectionPool size
if session_cls: | ||
self.session_cls = session_cls | ||
else: | ||
self.session_cls = requests.Session |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Any reason not to default to this in the param?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah I see, None can be passed
I was going to do this myself! +1 from me |
Any other optimizations you can think of to the session other than increasing the connection pool size? |
I'd have to think on that a bit more. We're actually standing up an egress proxy local to each application server to handle connections to external services. I'll let you know what we learn from that in a couple of weeks. |
@jlafon any thoughts |
@danielhochman hows that egress proxy working? |
This is very useful for overriding the size of the Connection Pool and other Session fields.